Code Monkey home page Code Monkey logo

leetcode-solutions's Introduction

Leetcode

My LeetCode Solutions. I am trying to solve 1 problem every day. I will be using this repo to keep track of my progress ☺️

Data Structures

Problem Difficulty Solution
1. Two Sum 🟒 Easy [Python3] [C++ Brute Force] [C++ Map] [C++ Two Pointers]
2. Add Two Numbers 🟑 Medium [C++]
9. Palindrome Number 🟒 Easy [Python3]
15. 3Sum 🟑 Medium [C++]
17. Letter Combinations of a Phone Number 🟑 Medium [C++]
18. 4Sum 🟑 Medium [C++]
20. Valid Parentheses 🟒 Easy [C++]
26. Remove Duplicates from Sorted Array 🟒 Easy [C++ brute force] [C++(optimal)]
27. Remove Element 🟒 Easy [C++ 1st approach] [C++ 2nd approach]
31. Next Permutation 🟑 Medium [C++]
33. Search in Rotated Sorted Array 🟑 Medium [C++]
34. Find First and Last Position of Element in Sorted Array 🟑 Medium [C++]
35. Search Insert Position 🟒 Easy [C++]
37. Sudoku Solver πŸ”΄ Hard [C++]
39. Combination Sum 🟑 Medium [C++] [C++(2nd approach)]
40. Combination Sum II 🟑 Medium [C++] [C++ 2nd Approach]
42. Trapping Rain Water πŸ”΄ Hard [C++]
46. Permutations 🟑 Medium [C++]
48. Rotate Image 🟑 Medium [C++]
49. Group Anagrams 🟑 Medium [C++]
50. Pow(x, n) 🟑 Medium [C++]
51. N-Queens πŸ”΄ Hard [C++]
53. Maximum Subarray 🟒 Easy [C++]
54. Spiral Matrix 🟑 Medium [C++]
56. Merge Intervals 🟑 Medium [C++]
59. Spiral Matrix II 🟑 Medium [C++]
73. Set Matrix Zeroes 🟑 Medium [C++]
74. Search a 2D Matrix 🟑 Medium [C++]
75.Sort colors 🟑 Medium [C++(Brute force)] [C++(2nd approach)] [C++(DNF)]
77. Combinations 🟑 Medium [C++]
78. Subsets 🟑 Medium [C++]
81. Search in Rotated Sorted Array II 🟑 Medium [C++]
84. Largest Rectangle in Histogram πŸ”΄ Hard [C++]
85. Maximal Rectangle πŸ”΄ Hard [C++]
90. Subsets II 🟑 Medium [C++] [C++(2nd approach)]
118. Pascal's Triangle 🟒 Easy [C++]
121. Best Time to Buy and Sell Stock 🟒 Easy [C++(Brute Force)] [C++(Optimal)]
128. Longest Consecutive Sequence 🟑 Medium [C++(Brute Force)] [C++(better approach)] [C++(Optimal)]
131. Palindrome Partitioning 🟑 Medium [C++]
136. Single Number 🟒 Easy [C++]
150. Evaluate Reverse Polish Notation 🟑 Medium [C++(Using Stack)]
151. Reverse Words in a String 🟑 Medium [C++]
152. Maximum Product Subarray 🟑 Medium [C++]
153. Find Minimum in Rotated Sorted Array 🟑 Medium [C++]
155. Min Stack 🟑 Medium [C++]
162. Find Peak Element 🟑 Medium [C++]
167. Two Sum II 🟑 Medium [C++]
169. Majority Element 🟒 Easy [C++(map)] [C++(Sorting)] [C++(Moore's algo)]
189. Rotate Array 🟑 Medium [C++] [C++(Optimal)]
206. Reverse LinkedList 🟒 Easy [C++(Using Stack)] [C++(Iterative)]
215. Kth Largest Element in an Array 🟑 Medium [C++(Heap)]
216. Combination Sum III 🟑 Medium [C++]
217. Contains Duplicate 🟒 Easy [C++]
225. Implement Stack using Queues 🟒 Easy [C++]
229. Majority Element II 🟑 Medium [C++]
234. Palindrome Linked List 🟒 Easy [C++(Brute Force)]
238. Product of Array Except Self 🟑 Medium [C++]
242. Valid Anagram 🟒 Easy [C++]
268. Missing Number 🟒 Easy [C++]
273. Integer To English Words πŸ”΄ Hard [C++]
283. Move Zeroes 🟒 Easy [C++(Brute Force)] [C++(Optimal)]
338. Counting Bits 🟑 Medium [C++]
343. Integer Break 🟑 Medium [C++]
347. Top K Frequent Elements 🟑 Medium [C++]
349. Intersection of Two Arrays 🟒 Easy [C++]
389. Find the Difference 🟒 Easy [C++(Map)] [C++(XOR)] [C++)]
402. Remove K Digits 🟑 Medium [C++]
410. Split Array Largest Sum 🟑 Medium [C++]
442. Find All Duplicates in an Array 🟑 Medium [C++]
476.Number Complement 🟒 Easy [C++]
493. Reverse Pairs πŸ”΄ Hard [C++]
496. Next Greater Element I 🟒 Easy [C++(Better Approach)] [C++(Optimal Approach)]
503. Next Greater Element II 🟑 Medium [C++]
509. Fibonacci Number 🟒 Easy [C++]
525.Contiguous Array 🟑 Medium [C++]
540. Single Element in a Sorted Array 🟑 Medium [C++]
560. Subarray Sum Equals K 🟑 Medium [C++]
624. Maximum Distance in Arrays 🟑 Medium [C++]
698. Partition to K Equal Sum Subsets 🟑 Medium [C++]
703. Kth Largest Element in a Stream 🟒 Easy [C++]
704. Binary Search 🟒 Easy [C++]
735. Asteroid Collision 🟑 Medium [C++]
821. Shortest Distance to a Character 🟒 Easy [C++]
840. Magic Squares In Grid 🟑 Medium [C++]
860. Lemonade Change 🟒 Easy [C++]
875. Koko Eating Bananas 🟑 Medium [C++]
876. Middle of a Linked List 🟒 Easy [C++ Brute Force] [C++ fast&slow ptr] [java]
885. Spiral Matrix III 🟑 Medium [C++]
896. Monotonic Array 🟒 Easy [C++]
901. Online Stock Span 🟑 Medium [C++]
905. Sort Array By Parity 🟒 Easy [C++]
907. Sum of Subarray Minimums 🟑 Medium [C++]
912. Sort an Array 🟑 Medium [C++]
946. Validate Stack Sequences 🟑 Medium [C++]
977. Squares of a Sorted Array 🟒 Easy [C++]
1006. Clumsy Factorial 🟑 Medium [C++]
1011. Capacity To Ship Packages Within D Days 🟑 Medium [C++]
1207. Unique Number of Occurrences 🟒 Easy [C++]
1239. Maximum Length of a Concatenated String with Unique Characters 🟑 Medium [C++]
1283. Find the Smallest Divisor Given a Threshold 🟑 Medium [C++]
1299. Replace Elements with Greatest Element on Right Side 🟒 Easy [C++]
1351. Count Negative Numbers in a Sorted Matrix 🟒 Easy [C++]
1431. Kids with the greatest no. of candies 🟒 Easy [C++]
1441. Build an Array With Stack Operations 🟒 Easy [C++]
1460. Make Two Arrays Equal By Reversing Subaarrays 🟒 Easy [C++ Sort] [C++ Map]
1464. Maximum Product of Two Elements in an Array 🟒 Easy [C++]
1475. Final Prices With a Special Discount in a Shop 🟒 Easy [C++]
1480. running sum 🟒 Easy [C++]
1482. Minimum Number of Days to Make m Bouquets 🟑 Medium [C++]
1508. Range Sum of Sorted Subarray Sums 🟑 Medium [C++ Brute Force]
1512. Number of Good Pairs 🟒 Easy [C++] [C++ Map]
1539. Kth Missing Positive Number 🟒 Easy [C++]
1552. Magnetic Force Between Two Balls 🟑 Medium [C++]
1568. Minimum Number of Days to Disconnect Island πŸ”΄ Hard [C++]
1748. Sum of Unique Elements 🟒 Easy [C++]
1752. Check if Array Is Sorted and Rotated 🟒 Easy [C++]
2032. Two Out of Three 🟑 Medium [C++]
2053. Kth Distinct String In an Array 🟒 Easy [C++]
2134.Minimum Swaps to Group All 1's Together II 🟑 Medium [C++ 1st Approach] [C++ 2nd Approach]
2206. Divide Array Into Equal Pairs 🟑 Medium [C++]
2207. Maximum Score From Removing Substrings 🟑 Medium [C++]
2357. Make Array Zero by Subtracting Equal Amounts 🟑 Medium [C++]
2678. Number of Senior Citizen 🟒 Easy [C++]
3016. Minimum Number of Pushes to Type Word II 🟑 Medium [C++]

<------------------------------------------------------------------------------------------------------------------------------------------------>

GeeksforGeeks Logo

Problem Difficulty Solution
Nearest Smaller Town 🟑 Medium [C++]

πŸ‘

leetcode-solutions's People

Contributors

dot-d69 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.