LC
https://leetcode.com/problems/arithmetic-slices/
morning routine
office: run training and hyper param jobs
Law 18/48
Law 17/48
Law 16/48
Once you have gained a certain level of respect temporary withdrawal will make you more admired.
TF-Nyc-Taxi fare prediction
LC Max width b-tree
morn routine
847. Shortest Path Visiting All Nodes
Couldn't solve
π Morning routine
Law 15/48
LC: 165. Compare Version Numbers
If version1 < version2, return -1.
If version1 > version2, return 1.
Otherwise, return 0.
Input: version1 = "1.0", version2 = "1.0.0"
Output: 0
If version1 > version2, return 1.
Otherwise, return 0.
Input: version1 = "1.0", version2 = "1.0.0"
Output: 0
π morn routine
Law 14/48
office: text classification
LC: sort linkedlist
office: Sequence models
Law 13/48
133. Clone Graph
office: gcp distributed training
π§π»βπ» 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.