#Day 2 of Solving 450 questions[10/450]

hesoyamm

Kishore kunal

Posted on March 21, 2022

#Day 2 of Solving 450 questions[10/450]

📅 Day 2: March 21,2022
Problem Solved today:
Minimize the Height of Tower
duplicate number(O(n) with constant space

Things i Learned:

  1. This problem took lot of effort(3hrs) as dealing with negative test cases was getting complex. Image description
  2. The second problem could be solved in multiple ways:

         - 1.  XOR operation[xor of same two number is 0]
         - 2.  Standard Floyd's tortoise and hare algorithm
    

-I used the first approach but the second option is a lot faster

Result:

Image description

GITHUB

💖 💪 🙅 🚩
hesoyamm
Kishore kunal

Posted on March 21, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related