Skip to content

This repo is created to post solutions to various leetcode problems

License

Notifications You must be signed in to change notification settings

karannagi/leetcode

Repository files navigation

# Leetcode Solutions

Below are some of the problems that I have solved on Leetcode, if you like/find any of your answer please leave a star. If you want to connect with me, I have shared my Linkedin URL below.

Question # Title # Solution Difficulty
1 Two Sum Link Easy
2 Add Two Numbers Link Medium
3 Longest Substring Without Repeating Characters Link Medium
8 String to Integer (atoi) Link Medium
11 Container With Most Water Link Medium
15 3Sum Link Medium
20 Valid Parentheses Link Easy
22 Generate Parentheses Link Medium
23 Merge k Sorted Lists Link Hard
37 Valid Sudoku Link Medium
42 Trapping Rain Water Link Hard
48 Rotate Image Link Medium
49 Group Anagrams Link Medium
53 Maximum Subarray Link Easy
73 Set Matrix Zeroes Link Medium
78 Subsets Link Medium
93 Restore IP Addresses Link Medium
94 Binary Tree Inorder Traversal Link Medium
98 Validate Binary Search Tree Link Medium
100 Same Tree Link Easy
101 Symmetric Tree Link Easy
102 Binary Tree Level Order Traversal Link Medium
103 Binary Tree Zigzag Level Order Traversal Link Medium
104 Maximum Depth of Binary Tree Link Easy
116 Populating Next Right Pointers in Each Node Link Medium
119 Pascal's Triangle II Link Easy
121 Best Time to Buy and Sell Stock Link Easy
124 Binary Tree Maximum Path Sum Link Hard
126 Word Ladder II Link Hard
129 Sum Root to Leaf Numbers Link Hard
138 Copy List with Random Pointer Link Medium
139 Word Break Link Medium
141 Linked List Cycle Link Easy
160 Intersection of Two Linked Lists Link Easy
165 Compare Version Numbers Link Medium
167 Two Sum II - Input array is sorted Link Easy
200 Number of Islands Link Medium
207 Course Schedule Link Medium
230 Kth Smallest Element in a BST Link Medium
253 Meeting Rooms II Link Medium
268 Missing Number Link Easy
283 Move Zeroes Link Easy
300 Longest Increasing Subsequence Link Medium
328 Odd Even Linked List Link Medium
347 Top K Frequent Elements Link Medium
387 First Unique Character in a String Link Easy
404 Sum of Left Leaves Link Easy
508 Most Frequent Subtree Sum Link Medium
529 Minesweeper Link Medium
532 K-diff Pairs in an Array Link Easy
535 Encode and Decode TinyURL Link Medium
537 Complex Number Multiplication Link Medium
538 Convert BST to Greater Tree Link Easy
589 N-ary Tree Preorder Traversal Link Easy
617 Merge Two Binary Trees Link Easy
640 Solve the Equation Link Medium
646 Maximum Length of Pair Chain Link Medium
661 Image Smoother Link Easy
662 Maximum Width of Binary Tree Link Medium
692 Top K Frequent Words Link Medium
700 Search in a Binary Search Tree Link Easy
701 Insert into a Binary Search Tree Link Medium
725 Split Linked List in Parts Link Medium
733 Flood Fill Link Easy
763 Partition Labels Link Medium
819 Most Common Word Link Easy
937 Reorder Data in Log Files Link Easy
938 Range Sum of BST Link Easy
965 Univalued Binary Tree Link Easy
994 Rotting Oranges Link Medium
1010 Pairs of Songs With Total Durations Divisible by 60 Link Medium
1094 Car Pooling Link Medium
1268 Search Suggestions System Link Medium
1409 Queries on a Permutation With Key Link Medium
2139 Minimum Moves to Reach Target Score Link Medium
We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:
  • Reporting a bug
  • Discussing the current state of the code
  • Submitting a fix
  • Proposing new features
  • Becoming a maintainer

To contribute just

  1. Fork this repo
  2. Clone your forked repo onto your machine git clone https://github.com/your_user_name/leetcode.git
  3. Create a branch to your liking git checkout -b my_branch_name
  4. Add your changes git add -A
  5. Commit your changes with a message git commit -m "My Message"
  6. Push to the branch git push
  7. Create a pull request from your forked repo online onto this repo.
  8. All set.