Skip to content

raiyanu/competitive-programming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

competitive-programming

Pending

  • leetcode-121BestTimeToBuyAndSellStock.js(issue:unoptimizied + Leetcode Time Limit Exceeded )
  • leetcode-LongestCommonPrefix(issue: unable to produce any approach to solve + easy but confusing)

competitive programming

  • Learning Java Programming language from linkedin learning path course

LeetCode Grinding

Week 1

  • 1. Two Sum (Easy, 15 mins) (Took 45 mins)
  • 2. Valid Parentheses (Easy, 20 mins) (Took 45 mins)
  • 3. Merge Two Sorted Lists (Easy, 20 mins)
  • 4. Best Time to Buy and Sell Stock (Easy, 20 mins)
  • 5. Valid Palindrome (Easy, 15 mins)
  • 6. Invert Binary Tree (Easy, 15 mins)
  • 7. Valid Anagram (Easy, 15 mins)
  • 8. Binary Search (Easy, 15 mins)
  • 9. Flood Fill (Easy, 20 mins)
  • 10. Lowest Common Ancestor of a Binary Search Tree (Easy, 20 mins)

Week 2

  • 1. Balanced Binary Tree (Easy, 15 mins)
  • 2. Linked List Cycle (Easy, 20 mins)
  • 3. Implement Queue using Stacks (Easy, 20 mins)
  • 4. First Bad Version (Easy, 20 mins)
  • 5. Ransom Note (Easy, 15 mins)
  • 6. Climbing Stairs (Easy, 20 mins)
  • 7. Longest Palindrome (Easy, 20 mins)
  • 8. Reverse Linked List (Easy, 20 mins)
  • 9. Majority Element (Easy, 20 mins)

Week 3

  • 1. Add Binary (Easy, 15 mins)
  • 2. Diameter of Binary Tree (Easy, 30 mins)
  • 3. Middle of the Linked List (Easy, 20 mins)
  • 4. Maximum Depth of Binary Tree (Easy, 15 mins)
  • 5. Contains Duplicate (Easy, 15 mins)
  • 6. Meeting Rooms (Easy, 20 mins)
  • 7. Roman to Integer (Easy, 20 mins)
  • 8. Backspace String Compare (Easy, 15 mins)
  • 9. Counting Bits (Easy, 15 mins)

Week 4

  • 1. Same Tree (Easy, 20 mins)
  • 2. Number of 1 Bits (Easy, 15 mins)
  • 3. Longest Common Prefix (Easy, 20 mins)
  • 4. Single Number (Easy, 15 mins)
  • 5. Palindrome Linked List (Easy, 20 mins)
  • 6. Move Zeroes (Easy, 20 mins)
  • 7. Symmetric Tree (Easy, 20 mins)
  • 8. Missing Number (Easy, 15 mins)
  • 9. Palindrome Number (Easy, 15 mins)
  • 10. Convert Sorted Array to Binary Search Tree (Easy, 20 mins)

Week 5

  • 1. Reverse Bits (Easy, 15 mins)
  • 2. Subtree of Another Tree (Easy, 20 mins)
  • 3. Squares of a Sorted Array (Easy, 20 mins)
  • 4. Maximum Subarray (Medium, 20 mins)
  • 5. Insert Interval (Medium, 25 mins)
  • 6. 01 Matrix (Medium, 30 mins)
  • 7. K Closest Points to Origin (Medium, 30 mins)

Week 6

  • 1. Longest Substring Without Repeating Characters (Medium, 30 mins)
  • 2. 3Sum (Medium, 30 mins)
  • 3. Binary Tree Level Order Traversal (Medium, 20 mins)
  • 4. Clone Graph (Medium, 25 mins)
  • 5. Evaluate Reverse Polish Notation (Medium, 30 mins)
  • 6. Course Schedule (Medium, 30 mins)

Week 7

  • 1. Implement Trie (Prefix Tree) (Medium, 35 mins)
  • 2. Coin Change (Medium, 25 mins)
  • 3. Product of Array Except Self (Medium, 30 mins)
  • 4. Min Stack (Medium, 20 mins)
  • 5. Validate Binary Search Tree (Medium, 20 mins)
  • 6. Number of Islands (Medium, 25 mins)

Week 8

  • 1. Rotting Oranges (Medium, 30 mins)
  • 2. Search in Rotated Sorted Array (Medium, 30 mins)
  • 3. Combination Sum (Medium, 30 mins)
  • 4. Permutations (Medium, 30 mins)
  • 5. Merge Intervals (Medium, 30 mins)
  • 6. Lowest Common Ancestor of a Binary Tree (Medium, 25 mins)

Week 9

  • 1. Time Based Key-Value Store (Medium, 35 mins)
  • 2. Accounts Merge (Medium, 30 mins)
  • 3. Sort Colors (Medium, 25 mins)
  • 4. Word Break (Medium, 30 mins)
  • 5. Partition Equal Subset Sum (Medium, 30 mins)
  • 6. String to Integer (atoi) (Medium, 25 mins)

Week 10

  • 1. Spiral Matrix (Medium, 25 mins)
  • 2. Subsets (Medium, 30 mins)
  • 3. Binary Tree Right Side View (Medium, 20 mins)
  • 4. Longest Palindromic Substring (Medium, 25 mins)
  • 5. Unique Paths (Medium, 20 mins)
  • 6. Construct Binary Tree from Preorder and Inorder Traversal (Medium, 25 mins)
  • 7. Container With Most Water (Medium, 35 mins)

Week 11

  • 1. Letter Combinations of a Phone Number (Medium, 30 mins)
  • 2. Word Search (Medium, 30 mins)
  • 3. Find All Anagrams in a String (Medium, 30 mins)
  • 4. Minimum Height Trees (Medium, 30 mins)
  • 5. Task Scheduler (Medium, 35 mins)

Week 12

  • 1. LRU Cache (Medium, 30 mins)
  • 2. Kth Smallest Element in a BST (Medium, 25 mins)
  • 3. Daily Temperatures (Medium, 30 mins)
  • 4. House Robber (Medium, 25 mins)
  • 5. Gas Station (Medium, 30 mins)
  • 6. Next Permutation (Medium, 30 mins)

Week 13

  • 1. Valid Sudoku (Medium, 35 mins)
  • 2. Group Anagrams (Medium, 25 mins)
  • 3. Maximum Product Subarray (Medium, 30 mins)
  • 4. Design Add and Search Words Data Structure (Medium, 35 mins)
  • 5. Pacific Atlantic Water Flow (Medium, 30 mins)
  • 6. Remove Nth Node From End of List (Medium, 20 mins)

Week 14

  • 1. Shortest Path to Get Food (Medium, 30 mins)
  • 2. Find the Duplicate Number (Medium, 20 mins)
  • 3. Top K Frequent Words (Medium, 30 mins)
  • 4. Longest Increasing Subsequence (Medium, 30 mins)
  • 5. Graph Valid Tree (Medium, 30 mins)
  • 6. Course Schedule II (Medium, 35 mins)

Week 15

  • 1. Swap Nodes in Pairs (Medium, 25 mins)
  • 2. Path Sum II (Medium, 25 mins)
  • 3. Longest Consecutive Sequence (Medium, 30 mins)
  • 4. Rotate Array (Medium, 25 mins)
  • 5. Odd Even Linked List (Medium, 25 mins)
  • 6. Decode String (Medium, 30 mins)

Week 16

  • 1. Contiguous Array (Medium, 30 mins)
  • 2. Maximum Width of Binary Tree (Medium, 20 mins)
  • 3. Find K Closest Elements (Medium, 30 mins)
  • 4. Longest Repeating Character Replacement (Medium, 30 mins)
  • 5. Inorder Successor in BST (Medium, 30 mins)
  • 6. Jump Game (Medium, 20 mins)

Week 17

  • 1. Add Two Numbers (Medium, 25 mins)
  • 2. Generate Parentheses (Medium, 25 mins)
  • 3. Sort List (Medium, 25 mins)
  • 4. Number of Connected Components in an Undirected Graph (Medium, 30 mins)
  • 5. Minimum Knight Moves (Medium, 35 mins)
  • 6. Subarray Sum Equals K (Medium, 35 mins)

Week 18

  • 1. Asteroid Collision (Medium, 30 mins)
  • 2. Random Pick with Weight (Medium, 25 mins)
  • 3. Kth Largest Element in an Array (Medium, 30 mins)
  • 4. Maximal Square (Medium, 30 mins)
  • 5. Rotate Image (Medium, 25 mins)
  • 6. Binary Tree Zigzag Level Order Traversal (Medium, 25 mins)

Week 19

  • 1. Design Hit Counter (Medium, 30 mins)
  • 2. Path Sum III (Medium, 35 mins)
  • 3. Pow(x, n) (Medium, 20 mins)
  • 4. Search a 2D Matrix (Medium, 30 mins)
  • 5. Largest Number (Medium, 20 mins)
  • 6. Decode Ways (Medium, 25 mins)

Week 20

  • 1. Meeting Rooms II (Medium, 30 mins)
  • 2. Reverse Integer (Medium, 25 mins)
  • 3. Set Matrix Zeroes (Medium, 25 mins)
  • 4. Reorder List (Medium, 25 mins)
  • 5. Encode and Decode Strings (Medium, 25 mins)
  • 6. Cheapest Flights Within K Stops (Medium, 45 mins)

Week 21

  • 1. All Nodes Distance K in Binary Tree (Medium, 25 mins)
  • 2. 3Sum Closest (Medium, 30 mins)
  • 3. Rotate List (Medium, 25 mins)
  • 4. Find Minimum in Rotated Sorted Array (Medium, 30 mins)
  • 5. Basic Calculator II (Medium, 30 mins)
  • 6. Combination Sum IV (Medium, 35 mins)

Week 22

  • 1. Insert Delete GetRandom O(1) (Medium, 20 mins)
  • 2. Non-overlapping Intervals (Medium, 20 mins)
  • 3. Minimum Window Substring (Hard, 30 mins)
  • 4. Serialize and Deserialize Binary Tree (Hard, 40 mins)
  • 5. Trapping Rain Water (Hard, 35 mins)
  • 6. Find Median from Data Stream (Hard, 30 mins)

Week 23

  • 1. Word Ladder (Hard, 45 mins)
  • 2. Basic Calculator (Hard, 40 mins)
  • 3. Maximum Profit in Job Scheduling (Hard, 45 mins)
  • 4. Merge k Sorted Lists (Hard, 30 mins)

Week 24

  • 1. Largest Rectangle in Histogram (Hard, 35 mins)
  • 2. Binary Tree Maximum Path Sum (Hard, 35 mins)
  • 3. Maximum Frequency Stack (Hard, 40 mins)
  • 4. Median of Two Sorted Arrays (Hard, 40 mins)

Week 25

  • 1. Longest Increasing Path in a Matrix (Hard, 40 mins)
  • 2. Longest Valid Parentheses (Hard, 35 mins)
  • 3. Design In-Memory File System (Hard, 40 mins)
  • 4. Employee Free Time (Hard, 35 mins)

Week 26

  • 1. Word Search II (Hard, 40 mins)
  • 2. Alien Dictionary (Hard, 45 mins)
  • 3. Bus Routes (Hard, 45 mins)
  • 4. Sliding Window Maximum (Hard, 35 mins)

Week 27

  • 1. Palindrome Pairs (Hard, 40 mins)
  • 2. Reverse Nodes in k-Group (Hard, 35 mins)
  • 3. Sudoku Solver (Hard, 40 mins)
  • 4. First Missing Positive (Hard, 35 mins)

Week 28

  • 1. N-Queens (Hard, 40 mins)
  • 2. Smallest Range Covering Elements from K Lists (Hard, 40 mins)

About

competitive programming

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published