Skip to main content
00:00/00:00
Lecture 63 of 482

JavaScript Solution Permutations

Download Course (Free)

Course Content

0 / 482 completed
Section 1: Day 1 Arrays Data Structures and Algorithms17 videos

Introduction to Data Structures

7m

Big O Space Complexity

4m

Asymptotic Analysis and Big O

18m

Introduction to Big O, Time Complexity

16m

What you're going to get from this course

29m

Big O Logarithm

5m

Welcome! How to make best use of this course (Please Watch)

39m

Arrays Data Structures Crash Course

14m

CODING INTERVIEW Q1 (Easy) Sorted Squared Array

2m

Method 1, Big O Analysis

3m

JS Code - Method 1

3m

JavaScript Code - Method 2

4m

Method 2

7m

CODING INTERVIEW Q2 (Easy) Monotonic Array

4m

Method and Big O analysis

7m

JavaScript Code - Monotonic Array

6m

Celebrating Milestones

7m
Section 2: Day 2 Recursion28 videos

Recursion Basics

11m

Recursive Leap of Faith

16m

Recursion vs Iteration

6m

Ways to write Base condition

4m

Visualising Recursion

11m

Recurrence relation

2m

How to Solve Recursion Questions

6m

Recursion is everywhere

3m

Complexity Analysis of Recursive Solutions

2m

Recursion Approaches - 0 to N and N to 0

8m

CODING INTERVIEW QUESTION (Medium) k-th symbol in Grammar

8m

Approach(k-th symbol in Grammar)

16m

Pseudocode (k-th symbol in Grammar)

4m

Complexity Analysis(k-th symbol in Grammar)

5m

JavaScript Solution (k-th symbol in Grammar)

4m

Pseudocode

5m

Complexity Analysis

2m

Approach 1

35m

JavaScript Solution 1 Josephus problem Method 1

4m

CODING INTERVIEW QUESTION (Medium) Josephus problem

33m

Approach 2

12m

Pseudocode

7m

JavaScript Solution 2 Josephus problem Method 2

2m

Complexity Analysis

2m

Approach 3

6m

Complexity Analysis

1m

JavaScript Solution 3 Josephus problem Method 3

1m

Celebrating Milestones

5m
Section 3: Day 3 Recursion Continued10 videos

Identifying that wew can use Recursion

3m

CODING INTERVIEW QUESTION (Medium) Tower of Hanoi

5m

Approach

7m

Recursion Tree

11m

JavaScript Solution Tower of Hanoi

9m

CODING INTERVIEW QUESTION(Medium) Power Sum

6m

JavaScript Solution Power Sum

2m

Method and Big O Analysis

10m

Celebrating Milestones

5m

Complexity Analysis Tower of Hanoi

40m
Section 4: Day 4 Backtracking17 videos

What is Backtracking

14m

How is it different from Recursion

1m

How does Backtracking work

12m

Pass by reference change inplace

7m

Identify when to use Backtracking

2m

Blueprint to solve questions using Backtracking

9m

CODING INTERVIEW QUESTION (Medium) Permutations

3m

JavaScript Solution Permutations

4mNow Playing

Approach

10m

Pseudocode

12m

CODING INTERVIEW QUESTION(Medium) Permutations 2

1m

Complexity Analysis

7m

Approach

6m

Pseudocode

4m

JavaScript Code Permutations 2

4m

Complexity Analysis Permutations 2

1m

Celebrating Milestones

5m
Section 5: Day 5 Backtracking10 videos

CODING INTERVIEW QUESTION(Medium) Subsets

2m

Subsets - Comparison with Backtracking Blueprint

5m

Method

17m

Subsets - Complexity Analysis

5m

CODING INTERVIEW QUESTION(Medium) Subsets 2

1m

JavaScript Code - Subsets

5m

code walkthrough (optional)

13m

Subsets 2 Complexity Analysis

2m

JavaScript Code Subsets 2

7m

Celebrating Milestones

5m
Section 6: Day 6 Backtracking12 videos

CODING INTERVIEW QUESTION(Medium) Combinations

2m

Approach

5m

Combinations Complexity Analysis

7m

JavaScript Code Combinations

5m

JavaScript Code Combinations with Optimisation

1m

Combinations Optimisation

5m

CODING INTERVIEW QUESTION ( Medium) Combinations Sum 1

3m

Sidenote Max number of nodes

6m

Complexity Analysis part 1

4m

Complexity Analysis part 2

6m

Celebrating Milestones

5m

JavaScript Code Combinations Sum 1

6m
Section 7: Day 7 Backtracking4 videos

CODING INTERVIEW QUESTION (Medium) Combinations Sum 2

3m

Complexity Analysis

2m

JavaScript Code Combination Sum 2

8m

Celebrating Milestones

5m
Section 8: Day 8 Backtracking10 videos

CODING INTERVIEW QUESTION(Hard) Sudoku Solver

9m

isValid check for Sudoku Solver

8m

Pseudocode

9m

CODING INTERVIEW QUESTION(Hard) N Queen

5m

Complexity Analysis

5m

JavaScript Code Sudoku Solver

24m

Approach

8m

Pseudocode

5m

Complexity Analysis

5m

JavaScript Code N Queen

24m
Section 9: Day 9 Dynamic Programming20 videos

Dynamic Programming - Patterns

4m

Introduction to Dynamic Programming (DP)

21m

Why writing the Recursive solution helps to write the Bottom up approach

4m

Identifying Dynamic Programming Questions

2m

Approach to solve DP(Dynamic Programming) Questions

9m

CODING INTERVIEW QUESTION(Easy) Fibonacci

5m

Approaches

1m

Approach 1 Recursion

3m

JavaScript Code - Recursion

1m

Complexity Analysis Approach 1 - Recursion

11m

Approach 2 Memoization

8m

Complexity Analysis Approach 2 - Memoization

2m

JavaScript Code Approach 2 - Memoization

2m

Approach 3 Tabulation

4m

Complexity Analysis Approach 3 - Tabulation

1m

JavaScript Code Approach 3 - Tabulation

3m

Approach 4 Space Optimised Tabulation + Complexity Analysis

6m

CODING INTERVIEW QUESTION(Easy) Climbing Stairs

4m

JavaScript Code Approach 4 -Space Optimised Tabulation + Complexity Analysis

2m

Approach

4m
Section 10: Day 10 Dynamic Programming Type - Fibonacci8 videos

CODING INTERVIEW QUESTION(Easy) Min Cost Climbing Stairs

3m

Recursive Approach

7m

JavaScript Code Recursive Approach

2m

Memoization Approach

6m

JavaScript Code Memoization Approach

2m

Tabulation Approach

9m

JavaScript Code Tabulation Approach

5m

Complexity Analysis

1m
Section 11: Day 11 Dynamic Programming Type - Knapsack19 videos

CODING INTERVIEW QUESTION(Medium) 01 Knapsack

10m

Recursive Approach Pseudocode

2m

Recursive Approach Complexity Analysis

2m

Approach 1 Recursion

15m

JavaScript Code Recursive Approach

6m

Memoization Pseudocode

1m

JavaScript Code Memoization

3m

Approach 2 Memoization

11m

Memoization Complexity Analysis

2m

JavaScript Code Tabulation

4m

JavaScript Code Space Optimised Tabulation

3m

Tabulation Complexity Analysis

1m

Approach 4 Space Optimised Tabulation Approach

10m

Space Optimised Tabulation Approach Complexity Analysis

1m

Approach 3 Tabulation

22m

CODING INTERVIEW QUESTION(Medium) Unbounded Knapsack

2m

Complexity Analysis

2m

Tabulation Approach

9m

JavaScript Code Unbounded Knapsack

4m
Section 12: Day 13 Dynamic Programming Type - LCS ( Longest Common Subsequence)22 videos

CODING INTERVIEW QUESTION(Medium) LCS

5m

JavaScript Code LCS

4m

Recursion Tree and Complexity Analysis

9m

Tabulation Complexity Analysis

1m

JavaScript Code Tabulation - LCS

6m

JavaScript Code Memoization - LCS

9m

Approach 4 Space Optimised Tabulation - LCS

5m

JavaScript Code Space Optimised Tabulation - LCS

3m

Approach 3 Tabulation

16m

Identifying this as an LCS Type Question

3m

CODING INTERVIEW QUESTION(Medium) Edit Distance

5m

Pseudocode

2m

Recursion Complexity Analysis

4m

Approach 1 Recursion

11m

JavaScript Code Recursive Approach(Edit Distance)

10m

Approach 2 Memoization

5m

Tabulation Complexity Analysis

1m

JavaScript Code Memoization(Edit Distance)

4m

JavaScript Code Tabulation (Edit Distance)

8m

Approach 4 Space Optimised Tabulation

5m

Approach 3 Tabulation

16m

JavaScript Code Space Optimised Tabulation ( Edit Distance)

8m
Section 13: Day 14 Dynamic Programming Type - LIS ( Longest Increasing Subsequence)29 videos

CODING INTERVIEW QUESTION(Medium) Longest Increasing Subsequence (LIS)

3m

Approach 1 Recursion - LIS

11m

Complexity Analysis - Recursion - LIS

3m

JavaScript Code - Recursion - LIS

4m

Complexity Analysis - Memoization

2m

Recursion Tree

15m

JavaScript Code - Memoization - LIS

3m

Complexity Analysis - Tabulation - using a 2D dp array

1m

Approach 3 Tabulation - using a 2D dp array

15m

Dry run

14m

JavaScript Code - Tabulation using a 2D dp array - LIS

7m

Approach 4 Tabulation - using a 1D dp array

16m

Complexity Analysis- Tabulation - using a 1D dp array

3m

Dry run

16m

Approach 5 using Binary Search - LIS

1m

JavaScript Code-Tabulation - using a 1D dp array

3m

Part 1 - Approach 5 using Binary Search - LIS

6m

Part 2 - Approach 5 using Binary Search - LIS

10m

Binary Search for this question ( refer Binary Search section for more details)

9m

Complexity Analysis - Approach 5 using Binary Search - LIS

1m

Why Sort

3m

CODING INTERVIEW QUESTION(Medium) Max Length of Pair Chain

7m

JavaScript Code - Approach 5 using Binary Search - LIS

14m

Approach

5m

JavaScript Code - Max Length of Pair Chain

4m

Approach

7m

Complexity Analysis

2m

CODING INTERVIEW QUESTION(Hard) Russian Doll Envelopes

6m

JavaScript Code

3m
Section 14: Day 15 Dynamic Programming Type - Gap Strategy Length wise Iteration21 videos

Introduction to Gap Strategy or Length wise Iteration

5m

CODING INTERVIEW QUESTION(Medium) Palindromic Substrings

5m

Approach Recursion with memoization

4m

Intuition for Approach

7m

Idetifying this as a DP question

2m

pseudocode

6m

Filling the Memoization table

3m

iterate length wise

9m

Recursion with memoization Complexity analysis

2m

Tabulation approach Complexity Analysis

1m

JavaScript Code Recursion with memoization

7m

Tabulation approach

9m

JavaScript Code Tabulation

7m

Approach (Tabulation)

3m

CODING INTERVIEW QUESTION(Medium) Longest Palindromic Substring

1m

Complexity Analysis

1m

JavaScript Code

2m

CODING INTERVIEW QUESTION(Medium) Longest Palindromic Subsequence

2m

Complexity Analysis

1m

JavaScript Code

4m

Approach

17m
Section 15: Day 16 Dynamic Programming Type - Partition Method17 videos

Introduction to the Partition method

1m

CODING INTERVIEW QUESTION(Medium) Palindrome Partitioning

3m

Side note Computing n C r

3m

Pseudocode

10m

CODING INTERVIEW QUESTION(Hard)Palindrome Partitioning 2 ( Minimum Cuts) - Hard

2m

JavaScript Code Palindrome Partitioning

6m

Approach 1 Recursion

6m

JavaScript Code Memoization - Palindrome Partitioning 2

11m

JavaScript Code Recursion - Palindrome Partitioning 2

6m

Tabulation - Approach A Palindrome Partitioning 2

9m

JavaScript Code Tabulation - Approach A Palindrome Partitioning 2

4m

Complexity Analysis

2m

Dry Run

16m

Dry run

6m

Tabulation - Approach B Palindrome Partitioning 2

8m

Pseudocode

4m

JavaScript Code Tabulation - Approach A Palindrome Partitioning 2

7m
Section 16: Day 17 Dynamic Programming Type - Partition Method17 videos

CODING INTERVIEW QUESTION(Medium) Word Break

2m

Approaches

1m

Approach 1 Tabulation

6m

Complexity Analysis

4m

JavaScript Code

4m

APPROACH 2 Part A Memoization

15m

JavaScript Code - Recursion

4m

JavaScript Code- Memoization

3m

Pseudocode

5m

APPROACH 2 Part B Tabulation

7m

Complexity Analysis

3m

CODING INTERVIEW QUESTION(Hard) Matrix Chain Multiplication

3m

Pseudocode

5m

JavaScript Code

4m

How to do Matrix Multiplication

8m

Back to the Question

5m

Intuition

3m
Section 17: Day 21 - Greedy Algorithms3 videos

Pseudocode

1m

Approach

11m

JavaScript Code - Greedy Approach

2m
Section 18: Day 22 - Greedy Algorithms2 videos

CODING INTERVIEW QUESTION Task Scheduler

3m

JavaScript Code

10m
Section 19: Day 24 Arrays Data Structures and Algorithms10 videos

Coding Interview Q1(Medium) Rotate Array

2m

Method and Big O analysis

11m

JavaScript Code Solution

5m

Coding Interview Q2(Medium) Container with most water

9m

JavaScript Code Method 1

4m

Code walkthrough and Big O analysis

5m

Method 1 and Big O analysis

10m

JavaScript Code Method 2

4m

Method 2 and Big O analysis

11m

Code walkthrough

6m
Section 20: Day 25 Dictionaries Hash Tables Data Structures and Algorithms10 videos

Coding Interview Q1(Easy) Two Sum

4m

Method 1, Big O analysis

7m

Hash Table Data Structures Crash Course

13m

Code Walkthrough

3m

JavaScript Code

5m

Method 2, Big O analysis

12m

Coding Interview Q2(Easy) Isomorphic Strings

4m

Code Walkthrough

14m

Method and Big O analysis

9m

JavaScript Code

12m
Section 21: Question Pattern 2 Pointers7 videos

Introduction to 2 Pointer Pattern

2m

CODING INTERVIEW QUESTION Best Time to Buy and Sell Stock

2m

Code

3m

CODING INTERVIEW QUESTION Two Sum 2

3m

Complexity Analysis

1m

Method

7m

Code

3m
Section 22: Question Pattern 2 Pointers continued6 videos

CODING INTERVIEW QUESTION 3 Sum

3m

Complexity Analysis

3m

Method 1

20m

Code - Method 1

11m

Method 2

9m

Code

5m
Section 23: Question Patterns Sliding Window10 videos

Introduction to Sliding Window Pattern

3m

CODING INTERVIEW QUESTION Max Avg Subarray I

3m

JS Code

4m

CODING INTERVIEW QUESTION Repeated DNA Sequence

3m

Test cases

1m

Method 1

4m

JS Code Method 1

6m

(Optional) Basics - Converting a number from base 4 to base 10

7m

Method 2

28m

JS Code Method 2

19m
Section 24: Question Patterns Sliding Window Continued18 videos

CODING INTERVIEW QUESTION Sliding Window Maximum

3m

Test Cases

1m

SideNote Deque data structure

13m

Method - Part 1 ( Intuition Observations)

20m

Method - Part 2 (Walkthrough)

17m

CODING INTERVIEW QUESTION Minimum Window Substring

4m

JS Code

13m

Test Cases

1m

CODING INTERVIEW QUESTION Min Size Subarray Sum

3m

Method

11m

Walkthrough

11m

JS Code

26m

Method

7m

CODING INTERVIEW QUESTION Frequency of most frequent element

5m

JS Code

6m

JS Code

12m

Method - Part 2 ( Walkthrough)

11m

Method - Part 1

25m
Section 25: Day 26 Strings Data Structures and Algorithms18 videos

Data Structures Crash Course Strings

4m

Coding Interview Q1(Easy) First Non Repeating Character

2m

JavaScript code

4m

Method 1 and Big O analysis

4m

Code walkthrough

5m

Method 2 and Big O analysis

4m

JavaScript code

4m

Code walkthrough

5m

Coding Interview Q2(Easy) Is Palindrome

2m

JavaScript code

2m

Method 1 and Big O analysis

4m

Code walkthrough

3m

Method 2 and Big O analysis

3m

JavaScript code

1m

Code walkthrough

2m

Method 3 and Big O analysis

3m

JavaScript code

2m

Code walkthrough

2m
Section 26: Day 27 Strings Data Structures and Algorithms6 videos

Coding Interview Q1(Medium) Longest Sub string with Unique characters

1m

Coding Interview Q2(Medium) Group Anagrams

2m

JavaScript code

9m

Code walkthrough

7m

method and Big O analysis

9m

JavaScript code

17m
Section 27: Day 28 Searching Algorithms6 videos

Coding Interview Q1 (Easy) Binary Search Algorithm

5m

JavaScript Code Iterative

8m

Coding Interview Q2(Medium) Search in rotated sorted array

4m

JavaScript Code Recursive

13m

JavaScript Code

14m

Method and Big O analysis

17m
Section 28: Day 29 Searching Algorithms4 videos

Coding Interview Q1(Medium) Search for range

2m

Coding Interview Q2(Medium) Search in Matrix

3m

JavaScript Code - Iterative

18m

JavaScript Code - Recursive

28m
Section 29: Day 30 Sorting Algorithms6 videos

Coding Interview Q1 Bubble Sort Algorithm

1m

JavaScript Code

5m

Code Walkthrough

7m

Coding Interview Q2 Insertion Sort Algorithm, Big O analysis

18m

Insertion sort is a stable sorting Algorithm

1m

Python code

14m
Section 30: Day 31 Sorting Algorithms5 videos

Coding Interview Q1 Selection Sort Algorithm, Big O analysis

7m

Coding Interview Q2 Merge Sort Algorithm

10m

JavaScript Code

9m

JS Code Walkthrough

9m

Method and Big O analysis

14m
Section 31: Day 32 Sorting Algorithms7 videos

Coding Interview Q1 Quick Sort Algorithm

14m

Optimise Time Complexity

13m

JS Code walkthrough

7m

Optimise Space Complexity

24m

Call stack walkthrough

18m

Coding Interview Q2 Radix Sort Algorithm, Big O analysis

45m

JavaScript Code

50m
Section 32: Question Pattern Merge Intervals11 videos

CODING INTERVIEW QUESTION Merge Intervals

10m

Introduction to Merge Intervals Coding Interview Question Pattern

7m

Complexity Analysis

3m

Method - Part 2 (Walkthrough)

20m

Method - Part 1

27m

JS Code

12m

Complexity Analysis

1m

CODING INTERVIEW QUESTION Insert Interval

11m

Method - Part 1

17m

Method - Part 2 (Walkthrough)

9m

JS Code

10m
Section 33: Question Pattern Merge Intervals Continued4 videos

CODING INTERVIEW QUESTION Non Overlapping Intervals

3m

Method Part 3 - Why Greedy

3m

Method Part 2 - Walkthrough

6m

Method Part 1

15m
Section 34: Day 33 Singly Linked List Data Structures and Algorithms5 videos

Data Structures Crash Course Linked Lists

12m

Coding Interview Q2 Remove Duplicates

1m

Coding Interview Q1(Medium) Design a Singly Linked List

6m

Javascript Code walkthrough

4m

Method and Big O analysis

1h 12m
Section 35: Day 34 Singly Linked List Data Structures and Algorithms4 videos

Coding Interview Q1(Easy) Reverse

1m

Coding Interview Q2(Medium) Cycle Detection

1m

Javascript Code walkthrough

4m

Proof

4m
Section 36: Day 35 Singly Linked List Data Structures and Algorithms4 videos

Coding Interview Q1(Medium) Find duplicate number

2m

method and Big O analysis

7m

Coding Interview Q2(Medium) Add 2 numbers

3m

method and Big O analysis

6m
Section 37: Day 36 Doubly Linked List Data Structures and Algorithms13 videos

Coding Interview Q1 Remove Node, Insert Node

3m

Method remove

7m

Insert Intro

5m

walkthrough remove

7m

JavaScript code Remove

21m

Method Insert

9m

Remove Val Method

4m

Insert at Position

3m

Coding Interview Q2 Remove Value, Insert at Position in Doubly Linked List

2m

JavaScript code Insert

16m

method

5m

Walkthrough Insert

3m

JavaScript Code

11m
Section 38: Day 37 Stacks Data Structures and Algorithms3 videos

Coding Interview Q1 Design a Stack

6m

Data Structures Crash Course Stacks and Queues

7m

Coding Interview Q2(Medium) Reverse Polish Notation

4m
Section 39: Day 38 Queue Data Structures and Algorithms3 videos

Coding Interview Q1 Design a Queue

5m

Coding Interview Q2(Easy) Queue with Stack

4m

method and Big O analysis

8m
Section 40: Day 39 Binary Tree Binary Search Tree Data Structures and Algorithms9 videos

Data Structures Crash Course Trees Introduction

4m

What is a BST - Binary Search Tree

6m

Proof height of Balanced Binary tree is floor(log N)

11m

Theory Binary Tree Terminaologies

10m

Theory Binary Trees 1

24m

Coding Interview Q1 Construct Binary Search Tree,Big O analysis

33m

Javascript Code Walkthrough

15m

Coding Interview Q2 Traverse - BFS and DFS,Big O analysis

35m

Javascript Code Walkthrough

24m
Section 41: Day 40 Binary Tree Traversal (Preorder, Inorder and Postorder- Iteratively)5 videos

CODING INTERVIEW QUESTION Pre order Traversal of Binary Tree Iterative

4m

JavaScript Code Preorder Traversal Iterative

3m

CODING INTERVIEW QUESTION Inorder Traversal of Binary Tree - Iterative

1m

Approach

16m

JavaScript Code - Inorder Traversal of Binary Tree

2m
Section 42: Day 41 Binary Tree3 videos

CODING INTERVIEW QUESTION Post order traversal of Binary Tree - Iterative

4m

JavaScript Code - Postorder Traversal of Binary Tree

3m

CODING INTERVIEW QUESTION Path Sum 2

4m
Section 43: Day 43 Binary Tree Binary Search Tree Data Structures and Algorithms7 videos

Coding Interview Q1(Medium) Level Order traversal

5m

Insert method

10m

Coding Interview Q2(Medium) Left Right view

2m

Level Order Traversal Method and Big O analysis

21m

Method and Big O analysis

14m

JavaScript code

14m

JavaScript code - Level order traversal

54m
Section 44: Day 46 Binary Tree Data Structures and Algorithms6 videos

Iterative method and Big O analysis

5m

Coding Interview Q1 (Easy) Invert Binary Tree

1m

JavaScript Code Iterative

14m

Recursive method and Big O analysis

6m

Coding Interview Q2 (Easy) Diameter of Binary Tree

3m

Method and Big O analysis

18m
Section 45: Day 47 Binary Search Trees Data Structures and Algorithms6 videos

Coding Interview Q1(Easy) sorted array to BST

3m

method and Big O analysis

19m

Coding Interview Q2(Medium) Valid BST

4m

JavaScript code

27m

Method and Big O analysis

14m

JavaScript Code

30m
Section 46: Day 51 Heaps and Priority Queue Data Structures and Algorithms5 videos

Binary Heap Data Structure Crash Course

34m

Proof of Build Binary Heap Time Complexity

16m

Coding Interview Q1 Construct Max Binary Heap, Big O analysis

26m

Introduction to Priority Queue

3m

Coding Interview Q2 Construct Priority Queue,Big O analysis

6m
Section 47: Day 52 Graphs Data Structures and Algorithms8 videos

Data Structures Crash Course Graphs Introduction

3m

Coding Interview Q1 BFS, Adjacency List,Big O analysis

20m

Data Structures Crash Course Graphs - Part 2

41m

Data Structures Crash Course Graphs - Part 3

1h 12m

BFS, Adjacency Matrix

47m

Coding Interview Q2 DFS, Recursive, Big O analysis

17m

DFS Iterative

26m

JavaScript Code

17m
Section 48: Day 53 Graphs Data Structures and Algorithms7 videos

Coding Interview Q2(Medium) Course Scheduler

6m

Coding Interview Q1 Number of Components, Big O analysis

17m

JavaScript Code

31m

Brute Force Method and Big O analysis

16m

Big O - Brute Force Method

22m

JavaScript Code - Brute Force Method

38m

Topological Sort based method and Big O analysis

37m