Home
Leet Code Learning Logs
Cancel

Find if Path Exists in Graph

View Find if Path Exists in Graph on LeetCode Statistics Time Spent Coding 7 minutes Time Complexity O(n) - If the graph is fully connected all the nodes will be visited twice, but mutliples of ...

Find the Town Judge

View Find the Town Judge on LeetCode Statistics Time Complexity O(n) - We must iterate through all the people in the town twice, but multiples of the growth factor do not affect the time complexi...

Maximal Network Rank

View Maximal Network Rank on LeetCode Statistics Time Spent Coding 10 minutes Time Complexity O(n2) - Each possible pair in the graph must be visited, resulting in the O(n2) time complexity. Sp...

Max Area of Island

View Max Area of Island on LeetCode Statistics Time Spent Coding 10 minutes Time Complexity O(n * m) - Every cell in the matrix must be visited at least once, resulting in the O(n * m) time comp...

Sort Array By Parity

View Sort Array By Parity on LeetCode Statistics Time Spent Coding 2 minutes Time Complexity O(n) - Every element in the input list must be seen, resulting in the O(b) time complexity. Space Co...

Maximum Number of Balloons

View Maximum Number of Balloons on LeetCode Statistics Time Spent Coding 5 minutes Time Complexity O(n) - Each character from the input string must be seen, resulting in the O(n) time complexity...

Average of Levels in Binary Tree

View Average of Levels in Binary Tree on LeetCode Statistics Time Spent Coding 15 minutes Time Complexity O(n) - Every node in the tree must be visited, resulting in the O(n) time complexity. S...

Minimum Depth of Binary Tree

View Minimum Depth of Binary Tree on LeetCode Statistics Time Spent Coding 15 minutes Time Complexity O(n) - Each node in the tree must be visited, resulting in the O(n) time complexity. Spac...

Implement Queue using Stacks

View Implement Queue using Stacks on LeetCode Statistics Time Spent Coding 5 minutes Time Complexity O(1) - All operations perform at an amortized (expected) rate of O(1) because if multiple pus...

Validate Stack Sequences

View Validate Stack Sequences on LeetCode Statistics Time Spent Coding 15 minutes Time Complexity O(n + m) - Each element from the inputs list will be visited at most twice, but that does not i...