Skip to content

This repo will have all my leetcode problems and will be updated almost regularly as I solve more and more problems

Notifications You must be signed in to change notification settings

frostbyte012/Daily-Problems-LeetCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Daily-Challenge-Problems-LeetCode

DAILY PRACTISE PROBLEMS FROM LEETCODE

This repo will have the solution of all major leetcode problems and codes in details in order to help solve the codes, open for the opensource learning community. This will help the community to learn and grow together.


All codes are written in C++. I welcome coders to contribute the codes in Python/Java/Other major language as well, if u find it helpful kindly star it and fork and contribute to it.



ss

Lets Pro Code 🔥 Te Amo's


2 phut hon


Contribution guidelines:

If you are contributing in languages other than c++, kindly follow the rules: make sure you create a folder name "language_name ex-python/java/javascript/any_other_language_that_youre_using" and then make sure you put the file name in the following order "QNo.xyz_problem.py","QNo.xyz_problem.jar","QNo.xyz_problem.js" etc example : "20.ValidParanthesis.py","20.ValidParanthesis.jar", "20.ValidParanthesis.js" Once done kindly update the README.md file by updating the Problems : by adding your code name format : "QNo.xyz_problem [Easy/Medium/Hard] [C++/Python/Java/Language You are using]" if youre using c++ its great simply add it here : in the main repo: "QNo.xyz_problem.cpp" ex "20.ValidParanthesis.cpp". Once done kindly update the README.md file by updating the Problems : by adding your code name format : "QNo.xyz_problem [Easy/Medium/Hard] [C++/Python/Java/Language You are using]"


Streak Level 🔥[Pro] : 196


2 phut hon


Problems :

  • 01. Two Sum [Easy].
  • 2. Add Two Numbers.[Medium]
  • 2. Add Two Numbers Simplified.[Medium]
  • 01. Two Sum Optimized[Easy].
  • 03. Longest Substring Without Repeating Characters. [Medium]
  • 07. Reverse Integer [Medium]
  • 11. Container with most water. [Medium]
  • 12. Integer to Roman. [Medium]
  • 13. Roman to Integer. [Easy]
  • 14. Longest Common Prefix. [Medium]
  • 15. 3 Sum [Medium]
  • 16. 3Sum Closest. [Medium]
  • 19. Remove Nth Node From End of List. [Medium]
  • 20. Valid Parantheses. [Easy]
  • 21. Merge Two Sorted Lists. [Easy]
  • 23. Merge k Sorted Lists. [Hard]
  • 26. Remove Duplicates from Sorted Array. [Easy]
  • 31. Next Permutation. [Medium]
  • 32. Longest Valid Parantheses. [Hard]
  • 32. Longest Valid Parantheses using Stack [Hard]
  • 33. Search in Rotated Sorted Array [Medium]
  • 38. Count and Say. [Medium]
  • 42. Trapping rain water. [Hard]
  • 44. Wildcard Matching. [Hard]
  • 45. Jump Game II. [Medium]
  • 48. Rotate Image. [Medium]
  • 49.Group Anagrams [Medium]
  • 51. N-Queens. [Hard]
  • 52. N-Queens-II. [Hard]
  • 55. Jump Game. [Medium]
  • 56. Maximum Subarray. [Medium]
  • 56. Merge Intervals. [Medium]
  • 66. Plus One.[Easy]
  • 67. Add Binary.[Easy]
  • 69. Sqrt(x) [Easy].
  • 70. Climbing Stairs. [Easy]
  • 75. Sort Colors. [Medium]
  • 76. Minimum Window Substring. [Hard]
  • 77. Combinations. [Medium]
  • 83. Remove Duplicates from Sorted List. [Easy]
  • 88. MergeSortedArray[O(1)]. [Easy]
  • 91. Decode Ways. [Medium]
  • 94. Binary Tree Inorder Traversal. [Easy]
  • 100. Same Tree. [Easy]
  • 101. Symmetric Tree. [Easy]
  • 102. Binary Tree Level Order Traversal. [Medium]
  • 103. Binary Tree Zigzag Level Order Traversal. [Medium]
  • 104. Maximum Depth of Binary Tree. [Easy]
  • 112. Path Sum. [Easy]
  • 113. Path Sum II. [Medium]
  • 118. Pascal's Triangle. [Easy]
  • 121. Best Time to Buy and Sell a Stock. [Easy]
  • 129. Sum Root to Leaf Numbers. [Medium]
  • 136. Single Number. [Easy]
  • 141. Linked List Cycle. [Easy]
  • 142. Linked List Cycle II. [Medium]
  • 144. Binary Tree Preorder Traversal. [Easy]
  • 150. Evaluate Reverse Polish Notation. [Medium]
  • 151. Reverse Words in a String.[Easy]
  • 152. Maximum Product Subarray. [Medium]
  • 153. Minimum of Rotated and Sorted Array. [Medium]
  • 153. Minimum of Rotated and Sorted Array Optimized. [Medium]
  • 160. Intersewction of Two Linked List. [Easy]
  • 167. Two Sum II Input Array Is Sorted. [Medium]
  • 169. Majority Element. [Easy]
  • 179. Largest Number. [Medium]
  • 189. Rotate Array. [Medium]
  • 191. Number of 1's Bits [Easy]
  • 198. House Robber. [Medium]
  • 202. Happy Number.[Easy]
  • 203. Remove Linked List Elements. [Easy]
  • 205. Isomorphic Strings.[Easy]
  • 206. Reverse Linked List. [Easy]
  • 215. Kth Largest Element. [Medium]
  • 217. Conatains Duplicate. [Easy]
  • 217. Conatains Duplicate Optimized Problem file. [Easy]
  • 222. Count Complete Tree Nodes. [Easy]
  • 224. Basic Calculator. [Hard]
  • 225. Implement Stack using Queues. [Easy]
  • 226. Invert Binary Tree. [Easy]
  • 228. Summary Ranges. [Easy]
  • 231. Power of Two. [Easy]
  • 232. Implement Queue using Stacks. [Easy]
  • 234. Palindrome Linked List. [Easy]
  • 235. Lowest Common Ancestor of a Binary Search Tree. [Easy]
  • 237. Delete Node in a Linked List. [Medium]
  • 237. Delete Node in a Linked List. [Easy]
  • 238. Product of Array Except itself. [Medium]
  • 242. Valid Anagram. [Easy]
  • 258. Add Digits. [Easy]
  • 263. Ugly Number. [Easy]
  • 268. Missing Number. [Easy]
  • 268. Missing Number Using Single Formula. [Easy]
  • 278. First Bad Version. [Medium]
  • 279. Perfect Squares. [Medium]
  • 290. Word Pattern. [Easy]
  • 300. Longest Increasing Subsequence. [Medium]
  • 318. Maximum Product of Word Lengths by Brute Force. [Midium]
  • 318. Maximum Product of Word Lengths by Bit Masking. [Optimized][Midium]
  • 326. Power of Three. [Easy]
  • 334. Increasing Triplet Subsequence. [Medium]
  • 342. Power of Four. [Easy]
  • 343. Integer Break. [Easy]
  • 344. Reverse the String Problem file. [Easy]
  • 345. Reverse Vowels of a String. [Easy]
  • 354. Russian Doll Envelopes. [Hard]
  • 367. Valid Perfect Square. [Easy]
  • 374. Guess Number Higher or Lower. [Easy]
  • 377. Combination Sum IV. [Medium]
  • 378. Kth Smallest Element In a Sorted Matrix. [Medium]
  • 383. Ransom Note. [Easy]
  • 387. First Unique Character in a String. [Easy]
  • 392. Is Subsequence. [Easy]
  • 414. Third Maximum Number.[Easy]
  • 424. Longest Character Replacement. [Medium]
  • 438. Find All Anagrams in a String. [Medium]
  • 452. Minimum Number of Arrows to Burst Balloons. [Medium]
  • 455. Assign Cookies. [Easy]
  • 458. Poor Pigs. [Hard]
  • 516. Minimum Window Substring [Hard]
  • 520. Detect Capital. [Easy]
  • 530. Minimum Absolute Difference in BST. [Easy]
  • 540. Single Element in a Sorted Array. [Medium]
  • 541. Rerverse String II. [Easy]
  • 547. Number of Provinces. [Medium]
  • 557. Reverse Words in a String III. [Easy]
  • 567. Permutation in String. [Medium]
  • 560. Sub Array Sum Equals k. [Medium]
  • 575. Distribute Candies. [Medium]
  • 605. Can Place Flowers. [Easy]
  • 622. Design Circular Queue. [Medium]
  • 623. Add One Row to Tree. [Medium]
  • 643. Maximum Average Subarray I. [Easy]
  • 645. Set Mismatch. [Easy]
  • 647. Palindromic Substrings. [Medium]
  • 653. Two Sum IV - Input is a BST. [Medium]
  • 658. Find K Closest Elements. [Medium]
  • 659. Split Array into Consecutive Subsequences. [Easy]
  • 662. Maximum Width of Binary Tree.[Medium]
  • 704. Binary Search. [Easy]
  • 790. Domino and Tromino Tiling. [Medium]
  • 729. My Calender 1. [Medium]
  • 730. Count Different Palindromic Subsequences [Hard]
  • 732. My Calendar III [Hard]
  • 739. Daily Temperatures. [Medium]
  • 744. Find Smallest Letter Greater Than Target. [Easy]
  • 763. Partition Labels. [Medium]
  • 771. Jewels and Stones. [Easy]
  • 783. Minimum Distance Between BST Nodes. [Easy]
  • 797. All Paths From Source to Target. [Medium]
  • 804. Unique Morse Code Words [Easy].
  • 834. Sum of Distances in Tree. [Hard]
  • 838. Push Dominoes. [Medium]
  • 841. Keys and Rooms. [Medium]
  • 844. Back Space String Problem. [Easy]
  • 858. Mirror-Reflection. [Medium]
  • 867. Transpose Matrix Problem. [Easy]
  • 869. Reordered Power of 2. [Medium]
  • 876. Middle of the Linked List. [Medium]
  • 886. Possible Bipartition. [Medium]
  • 905. Sort Array By Parity. [Easy]
  • 918. Maximum Sum Circular Subarray. [Medium]
  • 922. Sort Array By Parity II. [Easy]
  • 946. Validate Stack Sequences. [Medium]
  • 958. Check Completeness of a Binary Tree. [Medium]
  • 967. Numbers With Same Consecutive Differences. [Medium]
  • 980. Unique Paths III. [Hard]
  • 976. Largest Perimeter Triangle. [Easy]
  • 981. Time Based Key-Value Store. [Medium]
  • 989. Add to Array-Form of Integer. [Easy]
  • 1009. Complement of Base 10 Integer. [Easy]
  • 1011. Capacity To Ship Packages Within D Days. [Medium]
  • 1047. Remove All Adjacent Duplicates In String. [Easy]
  • 1155. Number of Dice Rolls With Target Sum. [Medium]
  • 1161. Maximum Level Sum of a Binary Tree. [Medium]
  • 1220. Count Vowels Permutation. [Hard]
  • 1232. Check If It Is a Straight Line. [Easy]
  • 1318. Minimum Flips to Make a OR b Equal to c. [Medium]
  • 1323. Maximum 69 Number. [Easy]
  • 1328. Break a Palindrome. [Medium]
  • 1329. Sort the Matrix Diagonally. [Medium]
  • 1332. Remove Palindromic Subsequences. [Easy]
  • 1338. Reduce Array Size to The Half. [Medium]
  • 1342. Number of Steps to Reduce A Number To Zero. [Easy]
  • 1351. Count Negative Numbers in a Sorted Matrix. [Easy]
  • 1365. How Many Numbers Are Smaller Than the Current Number. [Easy]
  • 1431. Kids With the Greatest Number of Candies. [Easy]
  • 1443. Minimum Time to Collect All Apples in a Tree/ [Medium]
  • 1461. Check If a String Contains All Binary Codes of Size K. [Medium]
  • 1480. Running Sum of 1D Array. [Easy]
  • 1480. Running Sum of 1D Array [Optimized]. [Easy]
  • 1491. Average Salary Excluding the Minimum and Maximum Salary. [Easy]
  • 1502. Can Make Arithmetic Progression From Sequence. [Easy]
  • 1512. Number of Good Pairs. [Easy]
  • 1523. Count Odd Numbers in an Interval Range. [Easy]
  • 1531. String Compression II. [Hard]
  • 1544. Make The String Great. [Easy]
  • 1578. Minimum Time to Make Rope Colorful. [Medium]
  • 1662. Check If Two String Arrays are Equivalent. [Medium]
  • 1680. Concatenation of Consecutive Binary Numbers. [Medium]
  • 1695. Maximum Erasure Value . [Medium]
  • 1706. Where Will the Ball Fall. [Medium]
  • 1732. Find the Highest Altitude. [Easy]
  • 1768. Merge Strings Alternately. [Easy]
  • 1822. Sign of the Product of an Array. [Easy]
  • 1832. Check if the Sentence Is Pangram. [Easy]
  • 1833. Maximum Ice Cream Bars. [Medium]
  • 1834. Single-Threaded CPU. [Medium]
  • 1971. Find if Path Exists in Graph. [Easy]
  • 2007. Find Original Array From Doubled Array. [Medium]
  • 2095. Delete the Middle Node of a Linked List. [Medium]
  • 2131. Longest Palindrome by Concatenating Two Letter Words. [Medium]
  • 2215. Find the Difference of Two Arrays. [Easy]
  • 2244. Minimum Rounds to Complete All Tasks. [Medium]
  • 2352. Equal Row and Column Pairs. [Medium]
  • 2256. Minimum Average Difference. [Medium]
  • 2389. Longest Subsequence With Limited Sum. [Easy]
  • 2390. Removing Stars From a String. [Medium]
  • 2405. Optimal Partition of String. [Medium]
  • 2610. Convert am array to a 2D array with intenal conditions. [Easy]
  • 2149. RearrangeArrayElementsBySign [Medium]


🔥 Happy LeetCoding Fellas and 2 Phut Hon!!! 🔥


    2 phut hon 2 phut hon 2 phut hon 2 phut hon