MCPcopy Create free account

hub / github.com/ashutosh11019/Strivers-A2Z-DSA-Course-Sheet / functions

Functions558 in github.com/ashutosh11019/Strivers-A2Z-DSA-Course-Sheet

MethodcalculateSpan
(int price[], int n)
Step 09 Stack and Queues/Step 9.3 Monotonic stack ans Queue Problems/GeeksForGeeks/Stock span problem.java:4
MethodcanJump
(int[] nums)
Step 12 Greedy Algorithms/Step 12.2 Medium-Hard Problems/LeetCode/Jump Game.java:2
MethodcanReach
(int[] A, int N)
Step 12 Greedy Algorithms/Step 12.2 Medium-Hard Problems/GeeksForGeeks/Jump Game.java:5
Methodcandy
(int[] ratings)
Step 12 Greedy Algorithms/Step 12.2 Medium-Hard Problems/LeetCode/Candy.java:2
Methodcelebrity
(int M[][], int n)
Step 09 Stack and Queues/Step 9.4 Implementation Problems/GeeksForGeeks/The Celebrity Problem.java:4
MethodcharacterReplacement
(String s, int k)
Step 10 Sliding Window & Two Pointer Combined Problems/Step 10.1 Medium Problems/LeetCode/Longest Repeating Character Replacement.java:2
Methodcheck
(int x)
Step 01 - Basics/Step 1.3 Basic Maths/Check_palindrome.java:2
Methodcheck
(int[] nums)
Step 03 Arrays/Step 3.1 Easy/LeetCode/Check if Array Is Sorted and Rotated.java:2
MethodcheckKthBit
(int n, int k)
Step 08 Bit Manipulation/Step 8.1 Learn Bit Manipulation/GeeksForGeeks/Check whether K-th bit is set or not.java:5
MethodcheckValidString
(String s)
Step 12 Greedy Algorithms/Step 12.1 Easy Problems/LeetCode/Valid Parenthesis String.java:2
Methodclosest3Sum
(int A[], int N, int X)
Step 03 Arrays/Step 3.3 Hard/GeeksForGeeks/3 sum closest.java:3
MethodcombinationSum
(ArrayList<Integer> A, int B)
Step 07 Recursion/Step 7.2 Subsequence Pattern/GeeksForGeeks/Combination Sum.java:7
MethodcombinationSum
(int[] candidates, int target)
Step 07 Recursion/Step 7.2 Subsequence Pattern/LeetCode/Combination Sum.java:2
MethodcombinationSum2
(int[] candidates, int target)
Step 07 Recursion/Step 7.2 Subsequence Pattern/LeetCode/Combination Sum II.java:2
MethodcombinationSum3
(int k, int n)
Step 07 Recursion/Step 7.2 Subsequence Pattern/LeetCode/Combination Sum III.java:2
Methodcompare
(Pair p1, Pair p2)
Step 05 strings/Step 5.2 Medium String Problems/GeeksForGeeks/Sorting Elements of an Array by Frequency.java:12
MethodcopyList
(Node head)
Step 06 LinkedList/Step 6.5 Hard Problem of LL/GeeksForGeeks/Clone a linked list with next and random pointer.java:16
MethodcopyRandomList
(Node head)
Step 06 LinkedList/Step 6.5 Hard Problem of LL/LeetCode/Copy List with Random Pointer.java:17
Methodcount
(int[] arr, int n, int x)
Step 04 Binary Search/Step 4.1 Learning BS on 1D Array/GeeksForGeeks/Number of occurrence.java:2
MethodcountBitsFlip
(int a, int b)
Step 08 Bit Manipulation/Step 8.2 Interview Problems/GeeksForGeeks/Bit Difference.java:4
MethodcountGoodNumbers
(long n)
Step 07 Recursion/Step 7.1 Get a Strong Hold/LeetCode/Count Good Numbers.java:4
MethodcountNodesinLoop
(Node head)
Step 06 LinkedList/Step 6.3 Medium Problem of LL/GeeksForGeeks/Find length of Loop.java:17
MethodcountPrimes
(int n)
Step 08 Bit Manipulation/Step 8.3 Advance Maths/Leetcode/Count Primes.java:2
MethodcountSetBits
(int n)
Step 08 Bit Manipulation/Step 8.1 Learn Bit Manipulation/GeeksForGeeks/Count total set bits.java:4
MethodcountSub
(long arr[], long n)
Step 11 Heaps/Step 11.1 Learning/GeeksForGeeks/Does array represent Heap.java:3
MethodcountSubarray
(int n, int[] nums, int k)
Step 10 Sliding Window & Two Pointer Combined Problems/Step 10.1 Medium Problems/GeeksForGeeks/Count Subarray with k odds.java:2
MethodcountSubstring
(String s)
Step 10 Sliding Window & Two Pointer Combined Problems/Step 10.1 Medium Problems/GeeksForGeeks/Count Substring.java:2
Methodcountdigit
(int N)
Step 01 - Basics/Step 1.3 Basic Maths/Count_Digits.java:3
MethodcutRod
(int price[], int n)
Step 11 Heaps/Step 11.3 Hard Problems/GeeksForGeeks/Rod Cutting.java:2
MethoddeleteKey
(int i)
Step 11 Heaps/Step 11.1 Learning/GeeksForGeeks/Binary Heap Operations.java:39
MethoddeleteMid
(Node head)
Step 06 LinkedList/Step 6.3 Medium Problem of LL/GeeksForGeeks/Delete Middle of Linked List.java:10
MethoddeleteMiddle
(ListNode head)
Step 06 LinkedList/Step 6.3 Medium Problem of LL/LeetCode/Delete the Middle Node of a Linked List.java:12
MethoddeleteNode
(Node head, int x)
Step 06 LinkedList/Step 6.1 1D Linked List/GeeksForGeeks/Delete a Node in Single Linked List.java:16
MethoddeleteNode
(ListNode node)
Step 06 LinkedList/Step 6.1 1D Linked List/LeetCode/Delete Node in a Linked List.java:10
MethoddeleteNode
(Node head,int x)
Step 06 LinkedList/Step 6.2 Doubly Linked List/GeeksForGeeks/Delete node in Doubly Linked List.java:17
Methoddequeue
()
Step 09 Stack and Queues/Step 9.1 Learning/GeeksForGeeks/Queue using stack.java:7
MethoddetectCycle
(ListNode head)
Step 06 LinkedList/Step 6.3 Medium Problem of LL/LeetCode/Linked List Cycle II.java:13
MethoddetectLoop
(Node head)
Step 06 LinkedList/Step 6.3 Medium Problem of LL/GeeksForGeeks/Detect Loop in linked list.java:3
Methoddiameter
(Node root)
Step 13 Binary Trees/Step 13.2 Medium Problems/GeeksForGeeks/Diameter of a Binary Tree.java:3
MethoddiameterOfBinaryTree
(TreeNode root)
Step 13 Binary Trees/Step 13.2 Medium Problems/LeetCode/Diameter of Binary Tree.java:3
Methoddivide
(int N, Node head)
Step 06 LinkedList/Step 6.3 Medium Problem of LL/GeeksForGeeks/Segregate even and odd nodes in a Link List.java:14
Methoddivide
(int A, int B)
Step 08 Bit Manipulation/Step 8.1 Learn Bit Manipulation/Leetcode/Divide Two Integers.java:2
Methoddivide
(long A, long B)
Step 08 Bit Manipulation/Step 8.1 Learn Bit Manipulation/GeeksForGeeks/Division without using multiplication, division and mod operator.java:3
Methodempty
()
Step 09 Stack and Queues/Step 9.1 Learning/Leetcode/Implement Stack using Queues.java:23
Methodenqueue
(int x)
Step 09 Stack and Queues/Step 9.1 Learning/GeeksForGeeks/Queue using stack.java:22
MethoderaseOverlapIntervals
(int[][] intervals)
Step 12 Greedy Algorithms/Step 12.2 Medium-Hard Problems/LeetCode/Non-overlapping Intervals.java:2
Methodexist
(char[][] board, String word)
Step 07 Recursion/Step 7.3 Try Out All Combo/LeetCode/Word Search.java:2
Methodfib
(int n)
Step 01 - Basics/Step 1.4 Basic Recursion/Fibonacci Number.java:2
Methodfind
(long arr[], int n, int x)
Step 04 Binary Search/Step 4.1 Learning BS on 1D Array/GeeksForGeeks/First and last occurrences of x.java:3
MethodfindContentChildren
(int[] g, int[] s)
Step 12 Greedy Algorithms/Step 12.1 Easy Problems/LeetCode/Assign Cookies.java:2
MethodfindFloor
(long arr[], int n, long x)
Step 04 Binary Search/Step 4.1 Learning BS on 1D Array/GeeksForGeeks/Floor in a Sorted Array.java:6
MethodfindIntersection
(Node head1, Node head2)
Step 06 LinkedList/Step 6.3 Medium Problem of LL/GeeksForGeeks/Intersection of Two Linked Lists.java:19
MethodfindK
(int a[][], int n, int m, int k)
Step 03 Arrays/Step 3.2 Medium/GeeksForGeeks/Spiral Matrix.java:4
MethodfindKRotation
(int arr[], int n)
Step 04 Binary Search/Step 4.1 Learning BS on 1D Array/GeeksForGeeks/Find out how many times has an array been rotated.java:2
MethodfindKthLargest
(int[] nums, int k)
Step 11 Heaps/Step 11.2 Medium Problems/LeetCode/Kth Largest Element in an Array.java:2
MethodfindKthPositive
(int[] arr, int k)
Step 04 Binary Search/Step 4.3 Find Answers by BS in Search Space/LeetCode/Kth Missing Positive Number.java:2
MethodfindLongestConseqSubseq
(int arr[], int N)
Step 03 Arrays/Step 3.2 Medium/GeeksForGeeks/Longest consecutive subsequence.java:7
MethodfindMaxConsecutiveOnes
(int[] nums)
Step 03 Arrays/Step 3.1 Easy/LeetCode/Max Consecutive Ones.java:2
MethodfindMaxSum
(Node node)
Step 13 Binary Trees/Step 13.2 Medium Problems/GeeksForGeeks/Maximum path sum from any node.java:4
MethodfindMedian
()
Step 11 Heaps/Step 11.3 Hard Problems/LeetCode/Find Median from Data Stream.java:21
MethodfindMedianSortedArrays
(int[] arr1, int[] arr2)
Step 04 Binary Search/Step 4.3 Find Answers by BS in Search Space/LeetCode/Median of Two Sorted Arrays.java:2
MethodfindMin
(int arr[], int n)
Step 04 Binary Search/Step 4.1 Learning BS on 1D Array/GeeksForGeeks/Minimum element in a sorted and rotated array.java:3
MethodfindMin
(int[] arr)
Step 04 Binary Search/Step 4.1 Learning BS on 1D Array/LeetCode/Find Minimum in Rotated Sorted Array.java:2
MethodfindPages
(int[]A,int N,int B)
Step 04 Binary Search/Step 4.3 Find Answers by BS in Search Space/GeeksForGeeks/Allocate minimum number of pages.java:4
MethodfindPairsWithGivenSum
(int target, Node head)
Step 06 LinkedList/Step 6.4 Medium Problem of DLL/GeeksForGeeks/Find pairs with given sum in DLL.java:21
MethodfindPath
(int[][] m, int n)
Step 07 Recursion/Step 7.3 Try Out All Combo/GeeksForGeeks/Rat in a Maze Problem - I.java:37
MethodfindPeakElement
(int[] nums)
Step 04 Binary Search/Step 4.1 Learning BS on 1D Array/LeetCode/Find Peak Element.java:2
MethodfindPeakGrid
(int[][] mat)
Step 04 Binary Search/Step 4.2 Applying BS on 2D Array/LeetCode/Find a Peak Element II.java:2
MethodfindPlatform
(int arr[], int dep[], int n)
Step 12 Greedy Algorithms/Step 12.2 Medium-Hard Problems/GeeksForGeeks/Minimum Platforms.java:5
MethodfindSpiral
(Node root)
Step 13 Binary Trees/Step 13.1 Traversals/GeeksForGeeks/Level order traversal in spiral form.java:5
MethodfindTwoElement
(int arr[], int n)
Step 03 Arrays/Step 3.3 Hard/GeeksForGeeks/Find Missing And Repeating.java:2
MethodfindUnion
(int arr1[], int arr2[], int n, int m)
Step 03 Arrays/Step 3.1 Easy/GeeksForGeeks/Union of two sorted array.java:4
MethodfindZeroes
(int arr[], int n, int m)
Step 03 Arrays/Step 3.1 Easy/GeeksForGeeks/Maximize Number of 1's.java:3
Methodflatten
(Node root)
Step 06 LinkedList/Step 6.5 Hard Problem of LL/GeeksForGeeks/Flattening a Linked List.java:28
MethodfloorSqrt
(long x)
Step 04 Binary Search/Step 4.3 Find Answers by BS in Search Space/GeeksForGeeks/Square root of a number.java:3
Methodfollow
(int followerId, int followeeId)
Step 11 Heaps/Step 11.3 Hard Problems/LeetCode/Design Twitter.java:35
MethodfourSum
(int[] arr, int k)
Step 03 Arrays/Step 3.3 Hard/GeeksForGeeks/Find All Four Sum Numbers.java:2
MethodfourSum
(int[] nums, int target)
Step 03 Arrays/Step 3.3 Hard/LeetCode/4Sum.java:2
MethodfractionalKnapsack
(int W, Item arr[], int n)
Step 12 Greedy Algorithms/Step 12.1 Easy Problems/GeeksForGeeks/Fractional Knapsack.java:4
MethodfrequencyCount
(int arr[], int N, int P)
Step 01 - Basics/Step 1.5 Basic Hashing/Frequencies of Limited Range Array Elements.java:3
MethodfrequencySort
(String s)
Step 05 strings/Step 5.2 Medium String Problems/LeetCode/Sort Characters By Frequency.java:2
Methodgcd
(Long num1, Long num2)
Step 01 - Basics/Step 1.3 Basic Maths/GCD.java:2
Methodgenerate
(int numRows)
Step 03 Arrays/Step 3.3 Hard/LeetCode/Pascal's Triangle.java:2
MethodgenerateParenthesis
(int n)
Step 07 Recursion/Step 7.2 Subsequence Pattern/LeetCode/Generate Parentheses.java:2
MethodgetCount
(Node head)
Step 06 LinkedList/Step 6.1 1D Linked List/GeeksForGeeks/Count nodes of linked list.java:4
MethodgetFloorAndCeil
(int[] arr, int n, int x)
Step 04 Binary Search/Step 4.1 Learning BS on 1D Array/GeeksForGeeks/Ceil The Floor.java:2
MethodgetIntersectionNode
(ListNode headA, ListNode headB)
Step 06 LinkedList/Step 6.3 Medium Problem of LL/LeetCode/Intersection of Two Linked Lists.java:13
MethodgetMaxArea
(long hist[], long N)
Step 09 Stack and Queues/Step 9.3 Monotonic stack ans Queue Problems/GeeksForGeeks/Maximum Rectangular Area in a Histogram.java:4
MethodgetMedian
()
Step 11 Heaps/Step 11.3 Hard Problems/GeeksForGeeks/Find median in a stream.java:27
MethodgetMiddle
(Node head)
Step 06 LinkedList/Step 6.3 Medium Problem of LL/GeeksForGeeks/Finding middle element in a linked list.java:11
MethodgetMin
()
Step 09 Stack and Queues/Step 9.1 Learning/Leetcode/Min Stack.java:40
MethodgetMin
()
Step 09 Stack and Queues/Step 9.1 Learning/GeeksForGeeks/Get minimum element from stack.java:18
MethodgetNewsFeed
(int userId)
Step 11 Heaps/Step 11.3 Hard Problems/LeetCode/Design Twitter.java:17
MethodgetNthFromLast
(Node head, int n)
Step 06 LinkedList/Step 6.3 Medium Problem of LL/GeeksForGeeks/Nth node from end of linked list.java:14
MethodgetOddOccurrence
(int[] arr, int n)
Step 08 Bit Manipulation/Step 8.2 Interview Problems/GeeksForGeeks/Exceptionally odd.java:2
MethodgoodNumbers
(int L, int R, int D)
Step 07 Recursion/Step 7.1 Get a Strong Hold/GeeksForGeeks/Good Numbers.java:2
MethodhasCycle
(ListNode head)
Step 06 LinkedList/Step 6.3 Medium Problem of LL/LeetCode/Linked List Cycle.java:13
Methodheight
(Node node)
Step 13 Binary Trees/Step 13.2 Medium Problems/GeeksForGeeks/Height of Binary Tree.java:3
MethodimmediateSmaller
(int arr[], int n)
Step 09 Stack and Queues/Step 9.3 Monotonic stack ans Queue Problems/GeeksForGeeks/Immediate Smaller Element.java:2
MethodinOrder
(Node root)
Step 13 Binary Trees/Step 13.1 Traversals/GeeksForGeeks/Inorder Traversal.java:3
← previousnext →201–300 of 558, ranked by callers