DEV Community

Kishore kunal
Kishore kunal

Posted on

#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

Top comments (0)