LC: 946. Validate Stack Sequences
799. Champagne Tower
Finding this could be solved using palindrome sequence was the real deal
LC
https://leetcode.com/problems/arithmetic-slices/
847. Shortest Path Visiting All Nodes
Couldn't solve
133. Clone Graph
🧑🏻💻 LC 169. Majority Element
Given an array num of size n, return the majority element. The majority element is the element that appears more than ⌊n / 2⌋ times.
Input: nums = [2,2,1,1,1,2,2]
Output: 2
The difficulty was in solving it in linear time O(n) and constant space O(1).
Solution: Use Boyer-Moore Voting Algorithm, choose a candidate element and +1 if same -1 if different if 0 then change candidate element.
Input: nums = [2,2,1,1,1,2,2]
Output: 2
The difficulty was in solving it in linear time O(n) and constant space O(1).
Solution: Use Boyer-Moore Voting Algorithm, choose a candidate element and +1 if same -1 if different if 0 then change candidate element.
🧑🏻💻 LC 1288. Remove Covered Intervals
lc 127. Word Ladde
A transformation sequence from word beginWord to word endWord using a dictionary wordList is a sequence of words beginWord -> s1 -> s2 -> ... -> sk
Input: beginWord = "hit", endWord = "cog", wordList = ["hot","dot","dog","lot","log","cog"]
Output: 5
Input: beginWord = "hit", endWord = "cog", wordList = ["hot","dot","dog","lot","log","cog"]
Output: 5
lc: non-sliding window problem 560
lc: 532 k diff pair
Brute force: T:O(nlogn) S:(n) -> Sorting + set
Time Optimal: T:(n) S:O(n) -> dictionary based
Space Optimal: T(nlogn) S:O(1) -> Sorting + 2 pointer
Time Optimal: T:(n) S:O(n) -> dictionary based
Space Optimal: T(nlogn) S:O(1) -> Sorting + 2 pointer
LC: 525. Contiguous Array with 0/1
lc 3 questions
41. First Missing Positive
leetcode daily
LC
Map-reduce follow-up question + external sort: https://leetcode.com/problems/intersection-of-two-arrays-ii/
Best time to buy and sell stocks: kadane's algo
Best time to buy and sell stocks: kadane's algo
LC: BFS
- flood fill
- 695. Max Area of Island
- 695. Max Area of Island
leetcode - binary search variations
competitive coding
stats revision for use cases
find use cases for Pay-per-click team
Lyft customer service use case
https://www.pramp.com/question/lK4AoGA0E5SgKL5MLmVw
pair with specific difference
stats revision
- basics
- inferential stats
- inferential stats
LC monthly challenge
mock
Algorithms: Largest Smaller BST Key @9:30 pm