GithubHelp home page GithubHelp logo

kartikth40 / dsa-javascript Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 133 KB

A curated list of solved DSA problems and implementations in JavaScript

JavaScript 100.00%
algorithms-and-data-structures dsa javascript problem-solving algorithms data-structures leetcode-javascript leetcode-solutions

dsa-javascript's Introduction

DSA-javascript-Interviews

  • This repo contains important solved leetCode problems for Interviews in JavaScript with some basic Data Structures and Algorithms Implementations.

  • I will keep updating it with every problem statement that I will solve.

  • If you find any error in my codes then feel free to open up a new issue or even making a pull request.

LeetCode Problems

Title Solution Difficulty Category
1. Two Sum Solution Easy Array, Hash Table
242. Valid Anagram Solution Easy Hash Table, String, Sorting
217. Contains Duplicate Solution Easy Array, Hash Table, Sorting
14. Longest Common Prefix Solution Easy String, Trie
20. Valid Parentheses Solution Easy String, Stack
121. Best Time to Buy and Sell Stock Solution Easy Array, DP
234. Palindrome Linked List Solution Easy Linked List, Two Pointers, Stack, Recursion
141. Linked List Cycle Solution Easy Hash Table, Linked List, Two Pointers
110. Balanced Binary Tree Solution Easy Tree, DFS
100. Same Tree Solution Easy Tree, DFS, BFS
572. Subtree of Another Tree Solution Easy Tree, DFS, BFS
543. Diameter of Binary Tree Solution Easy Tree, DFS
1046. Last Stone Weight Solution Easy Array, Heap
160. Intersection of Two Linked Lists Solution Medium Hash Table, Linked List, Two Pointers
567. Permutation in String Solution Medium Hash Table, Two Pointers, String, Sliding Window
5. Longest Palindromic Substring Solution Medium String, DP
739. Daily Temperatures Solution Medium Array, Stack, Monotonic Stack
11. Container With Most Water Solution Medium Array, Two Pointers, Greedy
3. Longest Substring Without Repeating Characters Solution Medium Hash Table, String, Sliding Window
19. Remove Nth Node From End of List Solution Medium Linked List, Two Pointers
2. Add Two Numbers Solution Medium Linked List, Math, Recursion
146. LRU Cache Solution Medium Hash Table, Linked List, Design
22. Generate Parentheses Solution Medium String, DP, Backtracking
122. Best Time to Buy and Sell Stock II Solution Medium Array, DP, Greedy
204. Count Primes Solution Medium Array, Math, Enumeration, Number Theory
128. Longest Consecutive Sequence Solution Medium Array, Hash Table, Union Find
424. Longest Repeating Character Replacement Solution Medium Hash Table, String, Sliding Window
300. Longest Increasing Subsequence Solution Medium Array, Binary Search, DP
347. Top K Frequent Elements Solution Medium Array, Hash Table, Sorting, Bucket Sort, Counting, Quickselect
150. Evaluate Reverse Polish Notation Solution Medium Array, Math, Stack
15. 3Sum Solution Medium Array, Two Pointers, Sorting
287. Find the Duplicate Number Solution Medium Array, Two Pointers, Binary Search, Bit Manipulation
162. Find Peak Element Solution Medium Array, Binary Search
33. Search in Rotated Sorted Array Solution Medium Array, Binary Search
34. Find First and Last Position of Element in Sorted Array Solution Medium Array, Binary Search
875. Koko Eating Bananas Solution Medium Array, Binary Search
105. Construct Binary Tree from Preorder and Inorder Traversal Solution Medium Array, Divide and Conquer, Tree
102. Binary Tree Level Order Traversal Solution Medium Tree, BST
1448. Count Good Nodes in Binary Tree Solution Medium Tree, DFS, BFS
98. Validate Binary Search Tree Solution Medium Tree, DFS, BFS
378. Kth Smallest Element in a Sorted Matrix Solution Medium Array, Binary Search, Sorting, Heap, Matrix
235. Lowest Common Ancestor of a Binary Search Tree Solution Medium Tree, DFS, BST
236. Lowest Common Ancestor of a Binary Tree Solution Medium Tree, DFS, BST
17. Letter Combinations of a Phone Number Solution Medium Hash Table, String, Backtracking
116. Populating Next Right Pointers in Each Node Solution Medium Linked List, Tree, DFS, BFS
78. Subsets Solution Medium Array, Backtracking
39. Combination Sum Solution Medium Array, Backtracking
46. Permutations Solution Medium Array, Backtracking
79. Word Search Solution Medium Array, Backtracking, Matrix
90. Subsets II Solution Medium Array, Backtracking
40. Combination Sum II Solution Medium Arrya, Backtracking
131. Palindrome Partitioning Solution Medium String, DP, Backtracking
42. Trapping Rain Water Solution Hard Array, Two Pointers, DP, Stack, Monotonic Stack
84. Largest Rectangle in Histogram Solution Hard Array, Stack, Monotonic Stack
4. Median of Two Sorted Arrays Solution Hard
25. Reverse Nodes in k-Group Solution Hard Linked List, Recursion
76. Minimum Window Substring Solution Hard Hash Table, String, Sliding Window
Sliding Window Maximum Solution Hard Array, Queue, Sliging Window, Heap
297. Serialize and Deserialize Binary Tree Solution Hard String, Tree, DFS, BFS
124. Binary Tree Maximum Path Sum Solution Hard DP, Tree, DFS

Algorithms

Sorting
  • Bubble Sort
  • Counting Sort
  • Heap Sort
  • Insertion Sort
  • Merge Sort
  • Quick Sort
  • Radix Sort
  • Selection Sort
  • Searching
  • Binary Search
  • Graph Algos
  • BFS
  • DFS
  • Dijkstra Shortest Path
  • Tree Algos
  • BFS
  • DFS
  • Data Structures

    dsa-javascript's People

    Contributors

    kartikth40 avatar

    Stargazers

     avatar  avatar  avatar  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.