Skip to content

Day 249 #514

Closed
Closed

Description

@vaskoz

Good morning! Here's your coding interview problem for today.

This problem was asked by Salesforce.

Given an array of integers, find the maximum XOR of any two elements.

Activity

  1. self-assigned this
    on Apr 29, 2019
  2. vaskoz commented on Apr 29, 2019

    @vaskoz
    OwnerAuthor

    Trie version is very slow due to bitwise processing.

    BenchmarkMaxXorPairLinear-12    	    3000	    478887 ns/op
    BenchmarkMaxXorPairSort-12      	 1000000	      1970 ns/op
    BenchmarkMaxXorPairBrute-12     	  300000	      5605 ns/op
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions