Home
Leet Code Learning Logs
Cancel

Remove Linked List Elements

View Remove Linked List Elements on LeetCode Statistics Time Spent Coding 10 minutes Time Complexity O(n) - Each element in the linked list must be visited, resulting in the O(n) time complexity...

Minimum Amount of Time to Fill Cups

View Minimum Amount of Time to Fill Cups on LeetCode Statistics Time Spent Coding 15 minutes Time Complexity O(1) - Since the amount list is always 3 elements the growth rate is constant, result...

Find the Kth Largest Integer in the Array

View Find the Kth Largest Integer in the Array on LeetCode Statistics Time Spent Coding 10 minutes Time Complexity O(n log n), The input array must be sorted, resulting in the O(n log n) time co...

Longest Arithmetic Subsequence of Given Difference

View Longest Arithmetic Subsequence of Given Difference on LeetCode Statistics Time Spent Coding 20 minutes Time Complexity O(n) - Each element in the array must be visisted, resulting in the O(...

N-ary Tree Level Order Traversal

View N-ary Tree Level Order Traversal on LeetCode Statistics Time Spent Coding 5 minutes Time Complexity O(n) - Each node in the tree must be visited, resulting in the O(n) time complexity. Spa...

Random Pick Index

View Random Pick Index on LeetCode Statistics Time Spent Coding 15 minutes Time Complexity O(n) - The program must initialize the hash table with the user input, resulting in the O(n) time compl...

Squares of a Sorted Array

View Squares of a Sorted Array on LeetCode Statistics Time Spent Coding 1 minute Time Complexity O(n) - At most, 2 * n elements are visited, but since a constant multiple of n does not increase ...

Generate a String With Characters That Have Odd Counts

View Generate a String With Characters That Have Odd Counts on LeetCode Statistics Time Spent Coding 3 minutes Time Complexity O(n) - The construction of the string takes O(n) time, resulting in...

Relative Sort Array

View Relative Sort Array on LeetCode Statistics Time Spent Coding 5 minutes Time Complexity O(n + m) - All of the elements from arr1 (n) and arr2 (m) must be visited, resulting in the O(n + m) t...

Destination City

View Destination City 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 multiples o...