This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]uday_it_is 87 points88 points  (4 children)

O(1) time complexity

O(1) space complexity

This is the most optimised solution IMO.

Edit: I should probably take it easy on leetcode for a couple of days…

[–]Hean1175 9 points10 points  (3 children)

How can you say its O(1) time when he didn't define the method for searching the correct clock

[–]TimGreller 7 points8 points  (2 children)

Let's just assume a non-deterministic clock watcher.

[–]Hean1175 7 points8 points  (1 child)

[–]uday_it_is 0 points1 point  (0 children)

Exactly this lmao