Skip to content

fatmakahveci/Leetcode-Solutions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode Shell Script MySQL Python Typescript JavaScript

Leetcode Solutions

  • You can check my DSA notes in my blog.
  • You can check my python notes in my blog.

Python

Leetcode 1. Two Sum

Leetcode 2. Add Two Numbers

Leetcode 3. Longest Substring Without Repeating Characters

Leetcode 4. Median of Two Sorted Arrays

Leetcode 5. Longest Palindromic Substring

Leetcode 6. Zigzag Conversion

Leetcode 7. Reverse Integer

Leetcode 8. String to Integer (atoi)

Leetcode 9. Palindrome Number

Leetcode 10. Regular Expression Matching

Leetcode 11. Container With Most Water

Leetcode 12. Integer to Roman

Leetcode 13. Roman to Integer

Leetcode 14. Longest Common Prefix

Leetcode 15. 3Sum

Leetcode 16. 3Sum Closest

Leetcode 17. Letter Combinations of a Phone Number

Leetcode 19. Remove Nth Node From End of List

Leetcode 20. Valid Parentheses

Leetcode 21. Merge Two Sorted Lists

Leetcode 22. Generate Parentheses

Leetcode 23. Merge k Sorted Lists

Leetcode 24. Swap Nodes in Pairs

Leetcode 26. Remove Duplicates from Sorted Array

Leetcode 27. Remove Element

Leetcode 28. Find the Index of the First Occurrence in a String

Leetcode 31. Next Permutation

Leetcode 33. Search in Rotated Sorted Array

Leetcode 34. Find First and Last Position of Element in Sorted Array

Leetcode 35. Search Insert Position

Leetcode 36. Valid Sudoku

Leetcode 42. Trapping Rain Water

Leetcode 43. Multiply Strings

Leetcode 48. Rotate Image

Leetcode 50. Pow(x, n)

Leetcode 53. Maximum Subarray

Leetcode 54. Spiral Matrix

Leetcode 55. Jump Game

Leetcode 56. Merge Intervals

Leetcode 57. Insert Interval

Leetcode 62. Unique Paths

Leetcode 66. Plus One

Leetcode 69. Sqrt x

Leetcode 70. Climbing Stairs

Leetcode 72. Edit Distance

Leetcode 76. Minimum Window Substring

Leetcode 77. Combinations

Leetcode 78. Subsets

Leetcode 79. Word Search

Leetcode 88. Merge Sorted Array

Leetcode 92. Reverse Linked List II

Leetcode 94. Binary Tree Inorder Traversal

Leetcode 98. Validate Binary Search Tree

Leetcode 100. Same Tree

Leetcode 101. Symmetric Tree

Leetcode 102. Binary Tree Level Order Traversal

Leetcode 104. Maximum Depth of Binary Tree

Leetcode 105. Construct Binary Tree from Preorder and Inorder Traversal

Leetcode 106. Construct Binary Tree from Inorder and Postorder Traversal

Leetcode 108. Convert Sorted Array to Binary Search Tree

Leetcode 110. Balanced Binary Tree

Leetcode 111. Minimum Depth of Binary Tree

Leetcode 112. Path Sum

Leetcode 116. Populating Next Right Pointers in Each Node

Leetcode 118. Pascal's Triangle

Leetcode 119. Pascal's Triangle II

Leetcode 121. Best Time to Buy and Sell Stock

Leetcode 122. Best Time to Buy and Sell Stock II

Leetcode 124. Binary Tree Maximum Path Sum

Leetcode 125. Valid Palindrome

Leetcode 127. Word Ladder

Leetcode 130. Surrounded Regions

Leetcode 133. Clone Graph

Leetcode 135. Candy

Leetcode 136. Single Number

Leetcode 138. Copy List with Random Pointer

Leetcode 139. Word Break

Leetcode 141. Linked List Cycle

Leetcode 142. Linked List Cycle II

Leetcode 144. Binary Tree Preorder Traversal

Leetcode 145. Binary Tree Postorder Traversal

Leetcode 146. LRU Cache

Leetcode 147. Insertion Sort List

Leetcode 150. Evaluate Reverse Polish Notation

Leetcode 152. Maximum Product Subarray

Leetcode 153. Find Minimum in Rotated Sorted Array

Leetcode 154. Find Minimum in Rotated Sorted Array II

Leetcode 155. Min Stack

Leetcode 156. Binary Tree Upside Down

Leetcode 157. Read N Characters Given Read4

Leetcode 158. Read N Characters Given Read4 II Call Multiple Times

Leetcode 159. Longest Substring with At Most Two Distinct Characters

Leetcode 160. Intersection of Two Linked Lists

Leetcode 162. Find Peak Element

Leetcode 163. Missing Ranges

Leetcode 167. Two Sum II. Input Array Is Sorted

Leetcode 169. Majority Element

Leetcode 170. Two Sum III. Data Structure Design

Leetcode 171. Excel Sheet Column Number

Leetcode 172. Factorial Trailing Zeroes

Leetcode 173. Binary Search Tree Iterator

Leetcode 189. Rotate Array

Leetcode 190. Reverse Bits

Leetcode 191. Number of 1 Bits

Leetcode 198. House Robber

Leetcode 199. Binary Tree Right Side View

Leetcode 200. Number of Islands

Leetcode 203. Remove Linked List Elements

Leetcode 205. Isomorphic Strings

Leetcode 206. Reverse Linked List

Leetcode 207. Course Schedule

Leetcode 208. Implement Trie (Prefix Tree)

Leetcode 210. Course Schedule II

Leetcode 211. Design Add and Search Words Data Structure

Leetcode 212. Word Search II

Leetcode 215. Kth Largest Element in an Array

Leetcode 217. Contains Duplicate

Leetcode 221. Maximal Square

Leetcode 222. Count Complete Tree Nodes

Leetcode 225. Implement Stack using Queues

Leetcode 226. Invert Binary Tree

Leetcode 232. Implement Queue using Stacks

Leetcode 235. Lowest Common Ancestor of a Binary Search Tree

Leetcode 237. Delete Node in a Linked List

Leetcode 273. Integer to English Words

Leetcode 278. First Bad Version

Leetcode 283. Move Zeroes

Leetcode 285. Inorder Successor in BST

Leetcode 286. Walls and Gates

Leetcode 287. Find the Duplicate Number

Leetcode 297. Serialize and Deserialize Binary Tree

Leetcode 308. Range Sum Query 2D. Mutable

Leetcode 314. Binary Tree Vertical Order Traversal

Leetcode 315. Count of Smaller Numbers After Self

Leetcode 319. Bulb Switcher

Leetcode 322. Coin Change

Leetcode 323. Number of Connected Components in an Undirected Graph

Leetcode 326. Power of Three

Leetcode 328. Odd Even Linked List

Leetcode 329. Longest Increasing Path in a Matrix

Leetcode 338. Counting Bits

Leetcode 344. Reverse String

Leetcode 346. Moving Average from Data Stream

Leetcode 347. Top K Frequent Elements

Leetcode 349. Intersection of Two Arrays

Leetcode 350. Intersection of Two Arrays II

Leetcode 351. Android Unlock Patterns

Leetcode 380. Insert Delete GetRandom O(1)

Leetcode 408. Valid Word Abbreviation

Leetcode 410. Split Array Largest Sum

Leetcode 414. Third Maximum Number

Leetcode 422. Valid Word Square

Leetcode 425. Word Squares

Leetcode 482. License Key Formatting

Leetcode 489. Robot Room Cleaner

Leetcode 588. Design In-Memory File System

Leetcode 605. Can Place Flowers

Leetcode 617. Merge Two Binary Trees

Leetcode 622. Design Circular Queue

Leetcode 628. Maximum Product of Three Numbers

Leetcode 637. Average of Levels in Binary Tree

Leetcode 642. Design Search Autocomplete System

Leetcode 653. Two Sum IV. Input is a BST

Leetcode 658. Find K Closest Elements

Leetcode 680. Valid Palindrome II

Leetcode 716. Max Stack

Leetcode 753. Cracking the Safe

Leetcode 818. Race Car

Leetcode 843. Guess the Word

Leetcode 857. Minimum Cost to Hire K Workers

Leetcode 912. Sort an Array

Leetcode 941. Valid Mountain Array

Leetcode 975. Odd Even Jump

Leetcode 987. Vertical Order Traversal of a Binary Tree

Leetcode 1025. Divisor Game

Leetcode 1099. Two Sum Less Than K

Leetcode 1207. Unique Number of Occurrences

Leetcode 1265. Print Immutable Linked List in Reverse

Leetcode 1293. Shortest Path in a Grid with Obstacles Elimination

Leetcode 1335. Minimum Difficulty of a Job Schedule

Leetcode 1342. Number of Steps to Reduce a Number to Zero

Leetcode 1346. Check If N and Its Double Exist

Leetcode 1588. Sum of All Odd Length Subarrays

Leetcode 1656. Design an Ordered Stream

Leetcode 1662. Check If Two String Arrays are Equivalent

Leetcode 1675. Minimize Deviation in Array

Leetcode 1678. Goal Parser Interpretation

Leetcode 1720. Decode XORed Array

Leetcode 1770. Maximum Score from Performing Multiplication Operations

Leetcode 1773. Count Items Matching a Rule

Leetcode 1812. Determine Color of a Chessboard Square

Leetcode 1832. Check if the Sentence Is Pangram

Leetcode 1859_- Sorting_the_Sentence

Leetcode 1874. Minimize Product Sum of Two Arrays

Leetcode 2006. Count Number of Pairs With Absolute Difference K

Leetcode 2037. Minimum Number of Moves to Seat Everyone

Leetcode 2325. Decode the Message

Leetcode 2367. Number of Arithmetic Triplets

Leetcode 2373. Largest Local Values in a Matrix

Leetcode 2413. Smallest Even Multiple

Leetcode 2469. Convert the Temperature

Leetcode 2769. Find the Maximum Achievable Number

Bash

Leetcode 192. Word Frequency

Leetcode 193. Valid Phone Numbers

Leetcode 194. Transpose File

Leetcode 195. Tenth Line

SQL

Leetcode 175. Combine Two Tables

Leetcode 1303. Find the Team Size

Leetcode 1350. Students With Invalid Departments

Leetcode 1378. Replace Employee ID With The Unique Identifier

Leetcode 1571. Warehouse Manager

Leetcode 1581. Customer Who Visited but Did Not Make Any Transactions

Leetcode 1587. Bank Account Summary II

Leetcode 1623. All Valid Triplets That Can Represent a Country

Leetcode 1683. Invalid Tweets

Leetcode 1693. Daily Leads and Partners

Leetcode 1741. Find Total Time Spent by Each Employee

Leetcode 1757. Recyclable and Low Fat Products

Leetcode 1795. Rearrange Products Table

Leetcode 1812. Determine Color of a Chessboard Square

Leetcode 1821. Find Customers With Positive Revenue this Year

Leetcode 2356. Number of Unique Subjects Taught by Each Teacher

TypeScript

Leetcode 2695. Array Wrapper

JavaScript