Comments on: Maximum XOR value of two elements https://demo.ritambhara.in/maximum-xor-value-of-two-elements/ Coding / System Design Interviews Sun, 04 Apr 2021 05:42:57 +0000 hourly 1 https://wordpress.org/?v=6.7.2 By: Onkar Sawant https://demo.ritambhara.in/maximum-xor-value-of-two-elements/#comment-5541 Sun, 04 Apr 2021 05:42:57 +0000 http://www.ritambhara.in/?p=8114#comment-5541 In reply to Uchenna Nwanyanwu.

O( n(log(max_element)) )

]]>
By: DK https://demo.ritambhara.in/maximum-xor-value-of-two-elements/#comment-2031 Wed, 23 Oct 2019 06:11:15 +0000 http://www.ritambhara.in/?p=8114#comment-2031 This is great and innovative solution but I am curious how to handle case for negative number in array. Negative number MSD will be 1 and all positive number (MSD 0) will lean toward negative and end finding negative?

]]>
By: Jigness Rockss https://demo.ritambhara.in/maximum-xor-value-of-two-elements/#comment-2030 Thu, 15 Aug 2019 13:36:22 +0000 http://www.ritambhara.in/?p=8114#comment-2030 The complexity of the algorithm as far as far as I understand is O(n), bro!

]]>
By: Uchenna Nwanyanwu https://demo.ritambhara.in/maximum-xor-value-of-two-elements/#comment-2029 Wed, 14 Aug 2019 15:54:47 +0000 http://www.ritambhara.in/?p=8114#comment-2029 This is a great use of Trie and bit manipulation. What do you think is the complexity of this algorithm?

]]>