Home
Titze's Learning Logs
Cancel

Unique Number of Occurrences

View Unique Number of Occurrences on LeetCode Statistics Time Spent Coding 2 minutes Time Complexity O(n) - In the worst case, every element in the input list will be visited twice, but constant...

Account Balance After Rounded Purchase

View Account Balance After Rounded Purchase on LeetCode Statistics Time Spent Coding 5 minutes Time Complexity O(1) - Only simple machine instructions are ran, and no operation iterates through ...

Minimum Time Difference

View Minimum Time Difference on LeetCode Statistics Time Spent Coding 20 minutes Time Complexity O(n2) - For every element at index i, its difference is calculated with the elements in the range...

Kth Missing Positive Number

View Kth Missing Positive Number on LeetCode Statistics Time Spent Coding 15 minutes Time Complexity O(n + k) - Each element in the list must be visited on top of k elements if the entire list i...

Valid Boomerang

View Valid Boomerang on LeetCode Statistics Time Complexity O(n) - Each pair in points must be visited, resulting in the O(n) time complexity. Space Complexity O(n) - Each pair in points must be...

Jump Game

View Jump Game on LeetCode Statistics Time Complexity O(n) - Each element in the input list is visited at most once, resulting in the O(n) time complexity. Space Complexity O(1) - Only one varia...

Repeated Substring Pattern

View Repeated Substring Pattern on LeetCode Statistics Time Spent Coding 2 minutes Time Complexity O(n) - The input string s is duplicated and iterated multiple times, but big-O does not conside...

Tweet Counts Per Frequency

View Tweet Counts Per Frequency on LeetCode Statistics Time Spent Coding 15 minutes Time Complexity O(m) - The getTweet... method must iterate through all of tweetName’s tweets (m) to determine ...

Subsets

View Subsets on LeetCode Statistics Time Spent Coding 10 minutes Time Complexity O(n * 2n) - This formula represents the number of combinations able to be made out of a list with a length of n. ...

Maximum Depth of Binary Tree

View Maximum Depth of Binary Tree on LeetCode Statistics Time Spent Coding 5 minutes Time Complexity O(n) - Every node in the tree is visited, resulting in the O(n) time complexity. Space Compl...