In this we will cover all algorithms that exist in DSA course. From basics to advance algorithms of Graphs, trees and dynamic programming (DP)
Aulas do Curso
(70 vídeos)
0 de 70 aulas concluídas
0%
Progresso salvo somente neste navegador.
0
Top 150+ DSA Leetcode Coding JAVA || Merge Sorted Array || Remove Element || Beginner to Advance
25 DSA PATTERNS Playlist: https://youtube.com/playlist?list=PLh_njhZ_MgInazcDWlX1RlpwIIYACSyIJ&si=6vGSwcgN16PXLfp6
Top 1…
1
Remove Duplicates from Sorted Array and 2nd part || Top 150+ DSA Leetcode Coding JAVA || 2 Pointers
25 DSA PATTERNS Playlist: https://youtube.com/playlist?list=PLh_njhZ_MgInazcDWlX1RlpwIIYACSyIJ&si=6vGSwcgN16PXLfp6
Top 1…
2
Majority Element (n/2) || Moore Voting Algorithm || Top 150+ DSA Leetcode Coding JAVA || HashMap
25 DSA PATTERNS Playlist: https://youtube.com/playlist?list=PLh_njhZ_MgInazcDWlX1RlpwIIYACSyIJ&si=6vGSwcgN16PXLfp6
Top 1…
3
Rotate Array by k Steps || Reverse sub array || Top 150+ DSA Leetcode Coding JAVA
25 DSA PATTERNS Playlist: https://youtube.com/playlist?list=PLh_njhZ_MgInazcDWlX1RlpwIIYACSyIJ&si=6vGSwcgN16PXLfp6
Top 1…
4
Best Time to Buy and Sell Stock & 2nd part || 2 pointer || Top 150+ DSA Leetcode Coding JAVA
25 DSA PATTERNS Playlist: https://youtube.com/playlist?list=PLh_njhZ_MgInazcDWlX1RlpwIIYACSyIJ&si=6vGSwcgN16PXLfp6
Top 1…
5
Jump Game || Greedy Approach || O(n) Time Complexity || Top 150+ DSA Leetcode Coding JAVA
25 DSA PATTERNS Playlist: https://youtube.com/playlist?list=PLh_njhZ_MgInazcDWlX1RlpwIIYACSyIJ&si=6vGSwcgN16PXLfp6
Top 1…
6
Jump Game 2 || Greedy Approach || O(n) Time Complexity || Top 150+ DSA Leetcode Coding JAVA
25 DSA PATTERNS Playlist: https://youtube.com/playlist?list=PLh_njhZ_MgInazcDWlX1RlpwIIYACSyIJ&si=6vGSwcgN16PXLfp6
Top 1…
7
11. H- Index || 2 Approach explained || O(n) Time Complexity || Top 150+ DSA Leetcode Coding JAVA
25 DSA PATTERNS Playlist: https://youtube.com/playlist?list=PLh_njhZ_MgInazcDWlX1RlpwIIYACSyIJ&si=6vGSwcgN16PXLfp6
Top 1…
8
Insert Delete GetRandom O(1) || Implement Class with O(1) Time || Top 150+ DSA Leetcode Coding JAVA
In this question, we need to implement RandomizedSet Class with following methods: Insert, Delete & GetRandom with O(1) …
9
13. Product of Array Except Self || 3 Approach explained || Top 150+ DSA Leetcode Coding JAVA
25 DSA PATTERNS Playlist: https://youtube.com/playlist?list=PLh_njhZ_MgInazcDWlX1RlpwIIYACSyIJ&si=6vGSwcgN16PXLfp6
Top 1…
10
14. Gas Station || 2 Approach explained || Return Starting Index|| Top 150+ DSA Leetcode Coding JAVA
In this question, There are n gas stations along a circular route, where the amount of gas at the ith station is gas[i].…
11
15. Candy || Find Min no. of Candies || 2 Approach explained || Top 150+ DSA Leetcode Coding JAVA
There are n children standing in a line. Each child is assigned a rating value given in the integer array ratings.
You …
12
16. Trapping Rain Water || Left & Right Auxiliary Arrays || Top 150+ DSA Leetcode Coding JAVA
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it …
13
17. Roman to Integer || 18. Integer to Roman || Top 150+ DSA Leetcode Coding JAVA
We have covered two questions: "Roman to Integer" and "Integer to Roman"
Watch till end to clearly understand the appro…
14
19. Length of Last Word || 20. Longest Common Prefix || String || Top 150+ DSA Leetcode Coding JAVA
We have covered two Leetcode String questions: "Length of Last Word" "Longest Common Prefix"
Watch till end to clearly…
15
21. Reverse Words in a String || 2 Approach || String Methods || Top 150+ DSA Leetcode Coding JAVA
A word is defined as a sequence of non-space characters. The words in s will be separated by at least one space.
Return…
16
22. Zigzag Conversion || String Methods || Top 150+ DSA Leetcode Coding JAVA
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display…
17
23. Find the Index of the First Occurrence in a String || Top 150+ DSA Leetcode Coding JAVA
Given two strings needle and haystack, return the index of the first occurrence of needle in haystack, or -1 if needle i…
18
24. Text Justification || Hard String Problem || Top 150+ DSA Leetcode Coding JAVA
Given an array of strings words and a width maxWidth, format the text such that each line has exactly maxWidth character…
19
25. Rotate Image || Rotate Matrix by 90 degree || Top 150+ DSA Leetcode Coding JAVA
You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise).
You have to rotate …
20
26. Merge Intervals || Merge Overlapping Subintervals || Top 150+ DSA Leetcode Coding JAVA
Given an array of intervals where intervals[i] = [start i, end i], merge all overlapping intervals, and return an array …
21
28. Find the Duplicate Number Floyd's Hare and Tortoise Top 150+ DSA Leetcode Coding JAVA
Given an array of integers nums containing n + 1 integers where each integer is in the range [1, n] inclusive.
There is…
22
29. Grid Unique Paths || Recursion || DP Memoization || Top 150+ DSA Leetcode Coding JAVA
There is a robot on an m x n grid. The robot is initially located at the top-left corner (i.e., grid[0][0]). The robot t…
23
Majority Element-2 (n/3) || Moore Voting Algorithm || Top 150+ DSA Leetcode Coding JAVA || HashMap
Given an integer array of size n, find all elements that appear more than ? n/3 ? times.
Approach-
1. HashMap
2. Boyer-…
24
31. Valid Palindrome || 32. Is Subsequence || Two Pointers || Top 150+ DSA Leetcode Coding JAVA
Two pointer approach:
As the name suggests, a two-pointer approach uses two-pointers to find the answer to a problem in …
25
33. Two Sum 2 - Input Array Is Sorted || Two Pointers || Top 150+ DSA Leetcode Coding JAVA
Given a 1-indexed array of integers numbers that is already sorted in non-decreasing order, find two numbers such that t…
26
34. Container With Most Water || Two Pointers || Top 150+ DSA Leetcode Coding JAVA
You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the i…
27
35. 3 Sum || Two Pointers || Top 150+ DSA Leetcode Coding JAVA
Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, a…
28
36. Move Zeroes || Two Pointers || Top 150+ DSA Leetcode Coding JAVA
Given an integer array nums, move all 0's to the end of it while maintaining the relative order of the non-zero elements…
29
37. Minimum Size Subarray Sum || Sliding Window || Top 150+ DSA Leetcode Coding JAVA
Given an array of positive integers nums and a positive integer target, return the minimal length of a
subarray
whose …
30
38. Longest Substring Without Repeating Characters || Sliding Window ||150+ DSA Leetcode Coding JAVA
Given a string s, find the length of the longest
substring without repeating characters.
Approach: Sliding Window O(n)…
31
39. Substring with Concatenation of All Words || Sliding Window || Top 150+ DSA Leetcode Coding JAVA
You are given a string s and an array of strings words. All the strings of words are of the same length.
A concatenated…
32
40. Minimum Window Substring || Sliding Window & HashMap || Top 150+ DSA Leetcode Coding JAVA
Given two strings s and t of lengths m and n respectively, return the minimum window substring of s such that every char…
33
41. Valid Sudoku || Matrix || HashSet || Top 150+ DSA Leetcode Coding JAVA
Determine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules:…
34
42. Spiral Matrix || Matrix || 4 pointers || Top 150+ DSA Leetcode Coding JAVA
Given an m x n matrix, return all elements of the matrix in spiral order.
Approach:
4 pointer: left, right, top and bo…
35
44. Set Matrix Zeroes || Matrix || Top 150+ DSA Leetcode Coding JAVA
Given an m x n integer matrix matrix, if an element is 0, set its entire row and column to 0's.
You must do it in place…
36
45. Game of Life || Matrix || Top 150+ DSA Leetcode Coding JAVA
The board is made up of an m x n grid of cells, where each cell has an initial state: live (represented by a 1) or dead …
37
46. Linked List Cycle & starting point of cycle || 61. Find the starting point of cycle || Top 150
Given the head of a linked list, return the node where the cycle begins. If there is no cycle, return null.
Linked List …
38
47. Add Two Numbers || Linked List || Top 150+ DSA Leetcode Coding JAVA
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order,…
39
48. Merge Two Sorted Lists || Linked List || Top 150+ DSA Leetcode Coding JAVA
You are given the heads of two sorted linked lists list1 and list2.
Merge the two lists into one sorted list. The list …
40
49. Copy List with Random Pointer || Linked List || Top 150+ DSA Leetcode Coding JAVA
Construct a deep copy of the list. The deep copy should consist of exactly n brand new nodes, where each new node has it…
41
50. Reverse Linked List 2 || Linked List || Top 150+ DSA Leetcode Coding JAVA
Given the head of a singly linked list and two integers left and right where left less than equal to right, reverse the …
42
51. Reverse Nodes in k-Group || Linked List || Top 150+ DSA Leetcode Coding JAVA
Given the head of a linked list, reverse the nodes of the list k at a time, and return the modified list.
k is a positi…
43
52. Remove Nth Node From End of List || Linked List || Top 150+ DSA Leetcode Coding JAVA
Given the head of a linked list, remove the nth node from the end of the list and return its head.
LinkedList Implement…
44
53. Remove Duplicates from Sorted List 2 || Linked List || Top 150+ DSA Leetcode Coding JAVA
Given the head of a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from…
45
54. Rotate List || Linked List || Top 150+ DSA Leetcode Coding JAVA
Given the head of a linked list, rotate the list to the right by k places.
LinkedList Implementation: https://youtu.be/…
46
55. Partition List || Linked List || Top 150+ DSA Leetcode Coding JAVA
Given the head of a linked list and a value x, partition it such that all nodes less than x come before nodes greater th…
47
56. LRU Cache || Doubly Linked List || Top 150+ DSA Leetcode Coding JAVA
Design a data structure that follows the constraints of a Least Recently Used (LRU) cache.
Implement the LRUCache class…
48
57. Find intersection point of Y LinkedList || Linked List || Top 150+ DSA Leetcode Coding JAVA
Given the heads of two singly linked-lists headA and headB, return the node at which the two lists intersect. If the two…
49
60. Palindrome Linked List || Linked List || Top 150+ DSA Leetcode Coding JAVA
Given the head of a singly linked list, return true if it is a
palindrome or false otherwise.
LinkedList Implementatio…
50
62. Flattening of a LinkedList || ArrayList & Recursion Approach || Top 150+ DSA Leetcode JAVA
Given a Linked List, where every node represents a sub-linked-list and contains two pointers:
(i) a next pointer to the …
51
63. Valid Parentheses || Stack || Top 150+ DSA Leetcode JAVA
Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.…
52
64. Simplify Path || Stack || Top 150+ DSA Leetcode JAVA
You are given an absolute path for a Unix-style file system, which always begins with a slash '/'. Your task is to trans…
53
65. Min Stack || 2 & 1 Stack || Top 150+ DSA Leetcode JAVA
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.
Implement the MinStac…
54
66.Evaluate Reverse Polish Notation || Stack || Top 150+ DSA Leetcode JAVA
You are given an array of strings tokens that represents an arithmetic expression in a Reverse Polish Notation.
Evaluat…
55
67. Basic Calculator || Stack || Top 150+ DSA Leetcode JAVA
Given a string s representing a valid expression, implement a basic calculator to evaluate it, and return the result of …
56
68. Previous Smaller Element || Stack || Top 150+ DSA Leetcode JAVA
Find Previous Smaller Element
We have started the most important part to crack Top Product Based Company i.e. Top DSA C…
57
70. Largest Rectangle in Histogram || Stack || Top 150+ DSA Leetcode JAVA
Given an array of integers heights representing the histogram's bar height where the width of each bar is 1, return the …
58
71. Sliding Window Maximum || Stack || Top 150+ DSA Leetcode JAVA
You are given an array of integers nums, there is a sliding window of size k which is moving from the very left of the a…
59
73. Rotten orange(using BFS) || Queue - Stack || Top 150+ DSA Leetcode JAVA
You are given an m x n grid where each cell can have one of three values:
0 representing an empty cell,
1 representing …
60
74. Stock Span Problem || Stack - Queue || Top 150+ DSA Leetcode JAVA
25 DSA PATTERNS Playlist: https://youtube.com/playlist?list=PLh_njhZ_MgInazcDWlX1RlpwIIYACSyIJ&si=6vGSwcgN16PXLfp6
I901…
61
75. Find the Maximum of Minimums of Every Window Size || Stack -Queue || Top 150+ DSA Leetcode JAVA
You are given an array of ‘N’ integers, you need to find the maximum of minimum for every window size. The size of the w…
62
75. Subset Sums || Recursion || Top 150+ DSA Leetcode JAVA
Given an array arr of integers, return the sums of all subsets in the list. Return the sums in any order.
We have star…
63
76. Subset 2 || Recursion || Top 150+ DSA Leetcode JAVA
90. Subsets II Given an integer array nums that may contain duplicates, return all possible subsets (the power set).
Th…
64
77. Combination Sum || Recursion || Top 150+ DSA Leetcode JAVA
39. Combination Sum: Given an array of distinct integers candidates and a target integer target, return a list of all un…
65
78. Combination Sum 2 || Recursion || Top 150+ DSA Leetcode JAVA
40. Combination Sum II
Given a collection of candidate numbers (candidates) and a target number (target), find all uniqu…
66
79. Palindrome Partitioning || Recursion || Top 150+ DSA Leetcode JAVA
131. Palindrome Partitioning
Given a string s, partition s such that every substring of the partition is a palindrome. R…
67
80. Permutation Sequence || Recursion || Math || Top 150+ DSA Leetcode JAVA
60. Permutation Sequence
The set [1, 2, 3, ..., n] contains a total of n! unique permutations.
We have started the most…
68
Binary Tree Intro || Tree Traversals DFS BFS || Preorder Inorder Postorder || Top 150+ DSA Leetcode
What is Binary Tree?
Tree terminologies.
Types of Binary Tree
Tree Traversals - Depth First Search (DFS), Breadth First …
69
81. Maximum Depth of Binary Tree || 82. Same Tree || Binary Tree || Top 150+ DSA Leetcode JAVA
104. Maximum Depth of Binary Tree
Given the root of a binary tree, return its maximum depth.
A binary tree's maximum de…