AnthonyRChao / 100DaysOfCode

A mix of LeetCode, HackerRank, and Data Structures & Algorithms.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

100DaysOfCode

Day-by-day coding progress listed below (mostly LeetCode, with some Coursera and HackerRank sprinkled in).

Personal Website
LeetCode Profile
HackerRank Profile


LeetCode Problem Counter: 123/200 (as of 6/12/19)


[x] Array and String
[x] Hash Table
[ ] Linked List
[ ] Queue and Stack
[ ] Binary Tree
[ ] Binary Search Tree
[ ] N-ary Tree
[ ] Trie
[ ] Recursion
[ ] Binary Search
[ ] Decision Tree


Day 0: Wednesday, March 27, 2019

[x] 617. Merge Two Binary Trees
[x] 226. Invert Binary Tree
[x] 965. Univalued Binary Tree

Thoughts: I am not as familiar as I thought with Trees. I had to look at the solutions for each of the questions. I will implement and familiarize myself with the different traversals for trees (DFS, BFS, Preorder, Inorder, Postorder) and do more problems to get more comfortable with recursive and iterative approaches.

The key insight to Merge Two Binary Trees is ...
The key insight to Invert a Binary Tree is ...
The key insight to check if a Binary Tree is Univalued is ...


Day 1: Thursday, March 28, 2019

[x] 406. Queue Reconstruction by Height

Thoughts: The key insight to Queue Reconstruction by Height is to sort the initial list of lists, people, by height descending and index ascending (via people = sorted(people, key=lambda x: (-x[0], x[1])). We then initialize a list to house our result. Iterate over each p in people and insert p at index p[1] in list.


Day 2: Friday, March 29, 2019

[x] 234. Palindrome Linked List
[x] 448. Find All Numbers Disappeared in an Array

Thoughts: I did not find the optimal solution for 234 and 448 within the 20 minute time frame for each. I was able to write a working naive solution. Will return to this ... TODO.


Day 3: Saturday, March 30, 2019

[x] 144. Binary Tree Preorder Traversal
[x] 94. Binary Tree Inorder Traversal
[x] 145. Binary Tree Postorder Traversal

Thoughts: For binary trees, practice the three different traversal methods: pre-order, in-order, and post order. Implement the methods both recursively and iteratively and compare the differences between them.


Day 4: Sunday, March 31, 2019

[x] UCSD DS & A Coursera Specialization - Data Structures - Week 1

Thoughts: I struggled to get the tree height problem working. Will re-visit.


Day 5: Monday, April 1, 2019

[x] Integer between 1 and 1000 with greatest steps to reach 1 based on the Collatz Conjecture
[x] 206. Reverse Linked List


Day 6: Tuesday, April 2, 2019

[x] 14. Longest Common Prefix


Day 7: Wednesday, April 3, 2019

[x] 538. Convert BST to Greater Tree
[x] 287. Find the Duplicate Number


Day 8: Thursday, April 4, 2019

[x] 347. Top K Frequent Elements


Day 9: Friday, April 5, 2019

[x] 7. Reverse Integer


Day 10: Saturday, April 6, 2019

[x] UCSD DS & A Coursera Specialization - Data Structures - Week 2


Day 11: Sunday, April 7, 2019

[x] 141. Linked List Cycle


Day 12: Monday, April 8, 2019

[x] HackerRank - Solve Me First
[x] HackerRank - Simple Array Sum
[x] HackerRank - Compare the Triplets
[x] HackerRank - Let's Echo
[x] HackerRank - A Very Big Sum
[x] HackerRank - Diagonal Difference
[x] HackerRank - Plus Minus
[x] HackerRank - Staircase
[x] HackerRank - Mini-Max Sum
[x] HackerRank - Birthday Cake Candles
[x] HackerRank - Time Conversion
[x] HackerRank - Grading Students

[x] 724. Find Pivot Index
[x] 747. Largest Number At Least Twice of Others
[x] 66. Plus One


Day 13: Tuesday, April 9, 2019

[x] 498. Diagonal Traverse
[x] 54. Spiral Matrix


Day 14: Wednesday, April 10, 2019

[x] 118. Pascal's Triangle


Day 15: Thursday, April 11, 2019

[x] 67. Add Binary


Day 16: Friday, April 12, 2019

[x] 28. Implement strStr()


Day 17: Saturday, April 13, 2019

[x] UCSD DS & A Coursera Specialization - Data Structures - Week 3, Lectures


Day 18: Sunday, April 14, 2019

[x] UCSD DS & A Coursera Specialization - Data Structures - Week 3, Problems


Day 19: Monday, April 15, 2019

[x] 344. Reverse String
[x] 167. Two Sum II - Input array is sorted
[x] 485. Max Consecutive Ones
[x] 27. Remove Element
[x] 561. Array Partition I
[x] 500. Keyboard Row


Day 20: Tuesday, April 16, 2019

[x] 151. Reverse Words in a String
[x] 557. Reverse Words in a String III


Day 21: Wednesday, April 17, 2019

[x] 189. Rotate Array
[x] 119. Pascal's Triangle II
[x] 26. Remove Duplicates from Sorted Array


Day 22: Thursday, April 18, 2019

[x] 283. Move Zeroes
[x] 209. Minimum Size Subarray Sum


Day 23: Friday, April 19, 2019

[x] UCSD DS & A Coursera Specialization - Data Structures - Week 4, Lectures


Day 24: Saturday, April 20, 2019

[x] 1029. Two City Scheduling
[x] 1030. Matrix Cells in Distance Order


Day 25: Sunday, April 21, 2019

[x] UCSD DS & A Coursera Specialization - Data Structures - Week 4, Problems
[x] 705. Design HashSet


Day 26: Monday, April 22, 2019

[x] 706. Design HashMap
[x] 136. Single Number
[x] 217. Contains Duplicate
[x] 349. Intersection of Two Arrays
[x] 202. Happy Number
[x] 1. Two Sum


Day 27: Tuesday, April 23, 2019

[x] 205. Isomorphic Strings
[x] 599. Minimum Index Sum of Two Lists


Day 28: Wednesday, April 24, 2019

[x] 387. First Unique Character in a String
[x] 350. Intersection of Two Arrays II


Day 29: Thursday, April 25, 2019

[x] 219. Contains Duplicate II
[x] 359. Logger Rate Limiter
[x] 49. Group Anagrams


Day 30: Friday, April 26, 2019

[x] 249. Group Shifted Strings
[x] 3. Longest Substring Without Repeating Characters


Day 31: Saturday, April 27, 2019

[x] UCSD DS & A Coursera Specialization - Binary Search Trees - Week 5, Lectures


Day 32: Sunday, April 28, 2019

[x] UCSD DS & A Coursera Specialization - Binary Search Trees - Week 5, Lectures


Day 33: Monday, April 29, 2019

[x] 170. Two Sum III - Data structure design
[x] 771. Jewels and Stones


Day 34: Tuesday, April 30, 2019

[x] 36. Valid Sudoku


Day 35: Wednesday, May 1, 2019

[x] 53. Maximum Subarray


Day 36: Thursday, May 2, 2019

[x] 652. Find Duplicate Subtrees


Day 37: Friday, May 3, 2019

[x] 125. Valid Palindrome


Day 38: Saturday, May 4, 2019

[x] 5051. Valid Boomerang
[x] 5050. Binary Search Tree to Greater Sum Tree


Day 39: Sunday, May 5, 2019

[x] UCSD DS & A Coursera Specialization - Binary Search Trees - Week 6, Lectures & Problems


Day 40: Monday, May 6, 2019

[x] 454. 4Sum II


Day 41: Tuesday, May 7, 2019

[x] 288. Unique Word Abbreviation


Day 42: Wednesday, May 8, 2019

[x] 380. Insert Delete GetRandom O(1)


Day 43: Thursday, May 9, 2019

[x] 141. Linked List Cycle


Day 44: Friday, May 10, 2019

None


Day 45: Saturday, May 11, 2019

None


Day 46: Sunday, May 12, 2019

None


Day 47: Monday, May 13, 2019

None


Day 48: Tuesday, May 14, 2019

[x] 707. Design Linked List
[x] 142. Linked List Cycle II


Day 49: Wednesday, May 15, 2019

[x] 160. Intersection of Two Linked Lists


Day 50: Thursday, May 16, 2019

[x] 19. Remove Nth Node From End of List


Day 51: Friday, May 17, 2019

[x] 206. Reverse Linked List


Day 52: Saturday, May 18, 2019

[x] 203. Remove Linked List Elements


Day 53: Sunday, May 19, 2019

[x] 328. Odd Even Linked List


Day 54: Monday, May 20, 2019

[x] 234. Palindrome Linked List


Day 55: Tuesday, May 21, 2019

None


Day 56: Wednesday, May 22, 2019

[x] 2. Add Two Numbers


Day 57: Thursday, May 23, 2019

[x] 430. Flatten a Multilevel Doubly Linked List
[x] 1050. Actors and Directors Who Cooperated At Least Three Times


Day 58: Friday, May 24, 2019

[x] 176. Second Highest Salary


Day 59: Saturday, May 25, 2019

[x] 977. Squares of a Sorted Array


Day 60: Sunday, May 26, 2019

[x] 938. Range Sum of BST
[x] 760. Find Anagram Mappings


Day 61: Monday, May 27, 2019

[x] 61. Rotate List


Day 62: Tuesday, May 28, 2019

[x] 138. Copy List with Random Pointer


Day 63: Wednesday, May 29, 2019

[x] 791. Custom Sort String


Day 64: Thursday, May 30, 2019

[x] 613. Shortest Distance in a Line


Day 65: Friday, May 31, 2019

None


Day 66: Saturday, June 1, 2019

None


Day 67: Sunday, June 2, 2019

[x] 1068. Product Sales Analysis I
[x] 1069. Product Sales Analysis II
[x] 584. Find Customer Referee
[x] 586. Customer Placing the Largest Number of Orders
[x] 610. Triangle Judgement
[x] 577. Employee Bonus


Day 68: Monday, June 3, 2019

[x] 607. Sales Person
[x] 183. Customers Who Never Order


Day 69: Tuesday, June 4, 2019

[x] 619. Biggest Single Number
[x] 175. Combine Two Tables
[x] 176. Second Highest Salary
[x] 177. Nth Highest Salary


Day 70: Wednesday, June 5, 2019

[x] 178. Rank Scores
[x] 185. Department Top Three Salaries
[x] 184. Department Highest Salary


Day 71: Thursday, June 6, 2019

[x] 1064. Fixed Point


Day 72: Friday, June 7, 2019

None


Day 73: Saturday, June 8, 2019

None


Day 74: Sunday, June 9, 2019

None


Day 75: Monday, June 10, 2019

[x] 708. Insert into a Cyclic Sorted List


Day 76: Tuesday, June 11, 2019

None


Day 77: Wednesday, June 12, 2019

[x] 1075. Project Employees I

Restart


Day 1: Thursday, February 5, 2020

[ ] [TBD]


Day 2: Friday, February 6, 2020

[ ] [TBD]

TODO

[ ] 46. Permutations
[ ] 78. Subsets
[ ] 142. Linked List Cycle II
[ ] 92. Reverse Linked List II
[ ] 341. Flatten Nested List Iterator
[ ] 160. Intersection of Two Linked Lists
[ ] 621. Task Scheduler
[ ] 102. Binary Tree Level Order Traversal
[ ] 297. Serialize and Deserialize Binary Tree
[ ] 267. Palindrome Permutation II
[ ] 386. Lexicographical Numbers
[ ] 1031. Maximum Sum of Two Non-Overlapping Subarrays
[ ] 1032. Stream of Characters
[ ] 41. First Missing Positive
[ ] 5047. Minimum Score Triangulation of Polygon
[ ] 5049. Moving Stones Until Consecutive II
[ ] 114. Flatten Binary Tree to Linked List

About

A mix of LeetCode, HackerRank, and Data Structures & Algorithms.

License:MIT License