JavaScript SDE Cheat Sheet
Tags: learnersbucket, javascript, frontend, webdev
Published: 2022-05-09 07:21:40

---
title: JavaScript SDE Cheat Sheet
published: true
description: A JavaScript interview cheat sheet that contains the list 200 questions from data structures & algorithms to javascript core concepts.
tags: learnersbucket, javascript, frontend, webdev
cover_image: https://learnersbucket.com/wp-content/uploads/2022/05/JavaScript-SDE-Cheat-Sheet1.png
canonical_url: https://learnersbucket.com/javascript-sde-cheat-sheet/
---

>I am currently running #250DaysOfJSQuestions on twitter where I share one JavaScript interview questions daily, follow me on twitter [@learnersbucket](https://twitter.com/LearnersBucket) for web dev and interview related content.

In 2019 January, during the lockdown, I had started solving problems in JavaScript and writing articles on it on my blog, over the time I have solved 300+ problems. This cheat sheet contains list of problem that can be asked to a JavaScript dev.

This is a curated list of solved problems in JavaScript categorized on the type & nature of the problem which you can refer to and use as a cheat sheet for interview preparation.

It contains Data Structures & Algorithms, functions, async, closure, & hoisting-related problems.

### DataStructures

*   [Javascript array: Complete reference.](https://learnersbucket.com/tutorials/array/javascript-array-complete-reference)
*   [Javascript Objects: Complete Reference.](https://learnersbucket.com/tutorials/data-structures/javascript-objects-complete-reference)
*   [Javascript String: Complete Reference.](https://learnersbucket.com/tutorials/data-structures/javascript-string)
*   [Implement Stack data structure in javascript.](https://learnersbucket.com/tutorials/algorithms/stack)
*   [Queue data structure in javascript.](https://learnersbucket.com/tutorials/algorithms/queue-implementation-in-javascript)
*   [List data structure in javascript.](https://learnersbucket.com/tutorials/data-structures/list-data-structure-in-javascript)
*   [Linked list data structure in javascript.](https://learnersbucket.com/tutorials/data-structures/linked-list-implementation-in-javascript)
*   [Implement stack using linked list.](https://learnersbucket.com/tutorials/data-structures/implement-stack-using-linked-list)
*   [Implement queue using linked list.](https://learnersbucket.com/tutorials/data-structures/implement-queue-using-linked-list)
*   [Doubly linked list implementation in javascript.](https://learnersbucket.com/tutorials/data-structures/doubly-linked-list-implementation-in-javascript)
*   [Implement deque data structure in javascript.](https://learnersbucket.com/tutorials/data-structures/implement-deque-data-structure-in-javascript)
*   [Deque data structure with doubly linked list.](https://learnersbucket.com/tutorials/data-structures/deque-data-structure-with-doubly-linked-list)
*   [Circular linked list implementation in javascript.](https://learnersbucket.com/tutorials/data-structures/circular-linked-list-implementation-in-javascript)
*   [Circular Doubly linked list in javascript.](https://learnersbucket.com/tutorials/data-structures/circular-doubly-linked-list-in-javascript)
*   [Priority Queue Implementation in javascript.](https://learnersbucket.com/tutorials/data-structures/priority-queue-implementation-in-javascript)
*   [Tree data structure in javascript.](https://learnersbucket.com/tutorials/data-structures/tree-data-structure-in-javascript)
*   [Heap data structure in Javascript.](https://learnersbucket.com/tutorials/array/heap-data-structure-in-javascript)
*   [Treap data structure in Javascript.](https://learnersbucket.com/tutorials/data-structures/treap-data-structure-in-javascript)
*   [Trie data structure in Javascript.](https://learnersbucket.com/tutorials/data-structures/trie-data-structure-in-javascript)
*   [Javascript graph data structure.](https://learnersbucket.com/tutorials/data-structures/javascript-graph-data-structure)
*   [AVL Tree in Javascript.](https://learnersbucket.com/tutorials/data-structures/avl-tree-in-javascript)

* * *

### Algorithms

It contains only the important ones, you can checkout the whole list [here](https://learnersbucket.com/examples/topics/algorithms/).

*   [Implement Stack data structure in javascript.](https://learnersbucket.com/examples/algorithms/balanced-parentheses)
*   [Print all subarrays with a given sum k in an array.](https://learnersbucket.com/examples/algorithms/subarrays-with-a-given-sum-k-in-an-array)
*   [Program to check if a subarray with 0 sum exits or not.](https://learnersbucket.com/examples/algorithms/program-to-check-if-a-subarray-with-0-sum-exits-or-not)
*   [Find distinct ways to climb the stairs in javascript.](https://learnersbucket.com/examples/algorithms/find-distinct-ways-to-climb-the-stairs-in-javascript)
*   [Caesar Cipher in javascript.](https://learnersbucket.com/examples/algorithms/caesar-cipher-in-javascript)
*   [Count all substrings having character k.](https://learnersbucket.com/examples/algorithms/count-all-substrings-having-character-k)
*   [Number of subarrays with given sum k.](https://learnersbucket.com/examples/algorithms/number-of-subarrays-with-given-sum-k)
*   [Implement a Stack using Queue.](https://learnersbucket.com/examples/algorithms/implement-a-stack-using-queue)
*   [Implement queue using two stack.](https://learnersbucket.com/examples/algorithms/implement-queue-using-two-stack)
*   [Learn how to implement two stack with an array.](https://learnersbucket.com/examples/algorithms/learn-how-to-implement-two-stack-with-an-array)
*   [Alternatively merge two different arrays.](https://learnersbucket.com/examples/algorithms/alternatively-merge-two-different-arrays)
*   [Implement stack with max and min function.](https://learnersbucket.com/examples/algorithms/implement-stack-with-max-and-min-function)
*   [Merge two sorted linked list.](https://learnersbucket.com/examples/algorithms/merge-two-sorted-linked-list)
*   [How to find loop in linked list.](https://learnersbucket.com/examples/algorithms/how-to-find-loop-in-linked-list)
*   [Find height and width of binary tree.](https://learnersbucket.com/examples/algorithms/find-height-and-width-of-binary-tree)
*   [Tree traversal in Javascript.](https://learnersbucket.com/examples/algorithms/tree-traversal-in-javascript)
*   [Flood fill algorithm in javascript.](https://learnersbucket.com/examples/algorithms/flood-fill-algorithm-in-javascript)
*   [Find longest palindrome in a string.](https://learnersbucket.com/examples/algorithms/find-longest-palindrome-in-a-string)
*   [Find all anagrams substring in a string.](https://learnersbucket.com/examples/algorithms/find-all-anagrams-substring-in-a-string)
*   [Find the largest sum of contiguous subarray.](https://learnersbucket.com/examples/algorithms/find-the-largest-sum-of-contiguous-subarray)
*   [Check if binary tree has path sum.](https://learnersbucket.com/examples/algorithms/check-if-binary-tree-has-path-sum)
*   [Rotate matrix 90 degrees clockwise and anti-clockwise.](https://learnersbucket.com/examples/algorithms/rotate-matrix-90-degrees-clockwise-and-anti-clockwise)
*   [Find the intersection point of two linked list.](https://learnersbucket.com/examples/algorithms/find-the-intersection-point-of-two-linked-list)
*   [Trapping rain water in javascript.](https://learnersbucket.com/examples/algorithms/trapping-rain-water-in-javascript)
*   [Diagonal traversal of binary tree.](https://learnersbucket.com/examples/algorithms/diagonal-traversal-of-binary-tree)
*   [Check if binary tree is symmetric.](https://learnersbucket.com/examples/algorithms/check-if-binary-tree-is-symmetric)
*   [Find floor and ceil of binary search tree.](https://learnersbucket.com/examples/algorithms/find-floor-and-ceil-of-binary-search-tree)
*   [Find Least Common Ancestor (LCA) of binary tree.](https://learnersbucket.com/examples/algorithms/find-least-common-ancestor-lca-of-binary-tree)
*   [Find kth smallest and largest element in BST.](https://learnersbucket.com/examples/algorithms/find-kth-smallest-and-largest-element-in-bst)
*   [Serialize and Deserialize Binary Tree.](https://learnersbucket.com/examples/algorithms/serialize-and-deserialize-binary-tree)
*   [Find inorder successor of a given key in a BST.](https://learnersbucket.com/examples/algorithms/find-inorder-successor-of-a-given-key-in-a-bst)
*   [Find inorder predecessor of a given key in a BST.](https://learnersbucket.com/examples/algorithms/find-inorder-predecessor-of-a-given-key-in-a-bst)
*   [N meetings in one room.](https://learnersbucket.com/examples/algorithms/n-meetings-in-one-room)
*   [knapsack problem in Javascript (Bounded & Unbounded).](https://learnersbucket.com/examples/algorithms/knapsack-problem-in-javascript)
*   [LRU cache in Javascript.](https://learnersbucket.com/examples/algorithms/lru-cache-in-javascript)
*   [Fractional knapsack problem.](https://learnersbucket.com/examples/algorithms/fractional-knapsack-problem)
*   [Longest Common Subsequence.](https://learnersbucket.com/examples/algorithms/longest-common-subsequence)
*   [Longest repeated subsequence.](https://learnersbucket.com/examples/algorithms/longest-repeated-subsequence)
*   [Longest Consecutive Sequence.](https://learnersbucket.com/examples/algorithms/longest-consecutive-sequence)
*   [Deepest leaves sum of binary tree.](https://learnersbucket.com/examples/algorithms/deepest-leaves-sum-of-binary-tree)

* * *

### Sorting

*   [Selection sort in javascript.](https://learnersbucket.com/examples/algorithms/selection-sort-in-javascript)
*   [Dutch national flag problem.](https://learnersbucket.com/examples/javascript/dutch-national-flag-problem)
*   [Bubble sort algorithm in javascript.](https://learnersbucket.com/examples/algorithms/bubble-sort-algorithm-in-javascript)
*   [Recursive Bubble sort algorithm.](https://learnersbucket.com/examples/algorithms/recursive-bubble-sort-algorithm)
*   [Insertion sort algorithm in javascript.](https://learnersbucket.com/examples/algorithms/insertion-sort-algorithm-in-javascript)
*   [Recursive Insertion Sort Algorithm.](https://learnersbucket.com/examples/algorithms/recursive-insertion-sort-algorithm)
*   [Sorting a linked list.](https://learnersbucket.com/examples/algorithms/sorting-a-linked-list)
*   [Bubble sort using two stacks.](https://learnersbucket.com/examples/algorithms/bubble-sort-using-two-stacks)
*   [Merge sort in javascript.](https://learnersbucket.com/tutorials/algorithms/merge-sort-javascript)
*   [Iterative merge sort algorithm.](https://learnersbucket.com/examples/algorithms/iterative-merge-sort-algorithm)
*   [Merge sort a linked list.](https://learnersbucket.com/examples/algorithms/merge-sort-a-linked-list)
*   [Quick sort algorithm in Javascript.](https://learnersbucket.com/tutorials/algorithms/quick-sort-algorithm-javascript)
*   [Quick sort Iterative.](https://learnersbucket.com/examples/algorithms/quick-sort-iterative)
*   [Quick sort using linked list.](https://learnersbucket.com/examples/algorithms/quick-sort-using-linked-list)
*   [Heap sort algorithm in Javascript.](https://learnersbucket.com/tutorials/algorithms/heap-sort-algorithm-in-javascript)
*   [Iterative heap sort in Javascript.](https://learnersbucket.com/examples/algorithms/iterative-heap-sort-in-javascript)
*   [Counting Sort Algorithm In Javascript.](https://learnersbucket.com/tutorials/algorithms/counting-sort-algorithm-in-javascript)
*   [Radix sort algorithm in Javascript.](https://learnersbucket.com/tutorials/algorithms/radix-sort-algorithm-in-javascript)
*   [Bucket Sort Algorithm.](https://learnersbucket.com/tutorials/algorithms/bucket-sort-algorithm)
*   [Shell Sort Algorithm In Javascript.](https://learnersbucket.com/tutorials/algorithms/shell-sort-algorithm-in-javascript)

* * *

### Searching

*   [Linear search algorithm in javascript.](https://learnersbucket.com/examples/algorithms/linear-search)
*   [Binary search in javascript.](https://learnersbucket.com/examples/algorithms/binary-search-in-javascript)
*   [Binary search in javascript.](https://learnersbucket.com/examples/algorithms/implement-iterative-binary-search)
*   [Search in a sorted rotated array.](https://learnersbucket.com/examples/algorithms/search-in-a-sorted-rotated-array)

* * *

### JavaScript specific problems.

I am currently working on this list, these are few random questions, you can find the full list [here](https://learnersbucket.com/examples/topics/interview/).

*   [How to merge objects in javascript.](https://learnersbucket.com/examples/interview/how-to-merge-objects-in-javascript)
*   [Compare two array or object with JavaScript.](https://learnersbucket.com/examples/array/compare-two-array-or-object-with-javascript)
*   [What is debouncing in javascript?.](https://learnersbucket.com/examples/interview/what-is-debouncing-in-javascript)
*   [What is throttling in javascript?.](https://learnersbucket.com/examples/interview/what-is-throttling-in-javascript)
*   [Number increment counter in Javascript (React).](https://learnersbucket.com/examples/interview/number-increment-counter-in-javascript-react)
*   [Detect idle state (inactive) in Javascript.](https://learnersbucket.com/examples/interview/detect-idle-state-inactive-in-javascript)
*   [Deep flatten object in Javascript – 1.](https://learnersbucket.com/examples/interview/deep-flatten-object-in-javascript-1)
*   [Currying in JavaScript.](https://learnersbucket.com/examples/interview/currying-in-javascript-part-1)
*   [Capture product visible on viewport when user stops scrolling.](https://learnersbucket.com/examples/interview/capture-product-visible-on-viewport-when-user-stops-scrolling)
*   [Animate elements in a sequence.](https://learnersbucket.com/examples/interview/animate-elements-in-a-sequence)
*   [Create Pausable auto incrementer.](https://learnersbucket.com/examples/interview/create-pausable-auto-incrementer)
*   [Implement clearAllTimeout in JavaScript.](https://learnersbucket.com/examples/interview/implement-clearalltimeout-in-javascript)
*   [Implement ClearAllInterval in JavaScript.](https://learnersbucket.com/examples/interview/implement-clearallinterval-in-javascript)
*   [Singleton design pattern in JavaScript.](https://learnersbucket.com/examples/interview/singleton-design-pattern-in-javascript)
*   [Observer design pattern in JavaScript.](https://learnersbucket.com/examples/interview/observer-design-pattern-in-javascript)
*   [Remove cycle from the object in JavaScript.](https://learnersbucket.com/examples/interview/remove-cycle-from-the-object-in-javascript)
*   [Execute async functions in Series.](https://learnersbucket.com/examples/interview/execute-async-functions-in-series)
*   [Retry promises N number of times in JavaScript.](https://learnersbucket.com/examples/interview/retry-promises-n-number-of-times-in-javascript)
*   [In-memory filesystem library in JavaScript.](https://learnersbucket.com/examples/interview/in-memory-filesystem-library-in-javascript)

* * *

### JavaScript projects.

*   [Create simple calculator with javascript.](https://learnersbucket.com/tutorials/js-projects/create-simple-calculator-with-javascript)
*   [Whack a mole game in javascript.](https://learnersbucket.com/tutorials/js-projects/whack-a-mole-game-in-javascript)
*   [Rock, Paper, Scissor, Lizard, Spock game in javascript.](https://learnersbucket.com/tutorials/js-projects/rock-paper-scissor-lizard-spock-game-in-javascript)
*   [Eye follow cursor in javascript.](https://learnersbucket.com/tutorials/js-projects/eye-follow-cursor-in-javascript)
*   [Text typing effect in javascript.](https://learnersbucket.com/tutorials/js-projects/text-typing-effect-in-javascript)
*   [Word falling effect in javascript.](https://learnersbucket.com/tutorials/js-projects/word-falling-effect-in-javascript)
*   [Day night toggle switch in javascript.](https://learnersbucket.com/tutorials/js-projects/day-night-toggle-switch-in-javascript)
*   [Day night toggle switch in javascript.](https://learnersbucket.com/tutorials/js-projects/user-profile-viewer-in-javascript)
*   [Roman to numeral converter javascript.](https://learnersbucket.com/tutorials/js-projects/roman-to-numeral-converter-javascript)
*   [Tic tac toe game in javascript with bot.](https://learnersbucket.com/tutorials/js-projects/tic-tac-toe-game-in-javascript-with-bot)

More questions will be added to it as and when I write them.