ShriPattern 10 : Subsets1. Given a set with distinct elements, find all of its distinct subsets.Jun 8, 2022Jun 8, 2022
ShriPattern 9 : Two Heaps1. Design a class to calculate the median of a number stream. The class should have the following two methods: insertNum(int num): stores…Jun 3, 2022Jun 3, 2022
ShriPattern 8 : Tree Depth First Search1. Given a binary tree and a number ‘S’, find if the tree has a path from root-to-leaf such that the sum of all the node values of that…May 27, 2022May 27, 2022
ShriPattern 7 : Tree Breadth First Search1. Given a binary tree, populate an array to represent its level-by-level traversal. You should populate the values of all nodes of each…May 26, 2022May 26, 2022
ShriPattern 6 : In-place Reversal of a LinkedList1. Given the head of a Singly LinkedList, reverse the LinkedList. Write a function to return the new head of the reversed LinkedList.May 26, 2022May 26, 2022
ShriPattern 5 : Cyclic Sort1 . We are given an array containing n objects. Each object, when created, was assigned a unique number from the range 1 to n based on…May 26, 2022May 26, 2022
ShriPattern 4: Merge Intervals1. Given a list of intervals, merge all the overlapping intervals to produce a list that has only mutually exclusive intervals.May 19, 2022May 19, 2022
ShriPattern 3 : Fast & Slow pointers1. Given the head of a Singly LinkedList, write a function to determine if the LinkedList has a cycle in it or not.May 17, 2022May 17, 2022
ShriPattern 2: Two PointersGiven an array of sorted numbers and a target sum, find a pair in the array whose sum is equal to the given target. Write a function to…May 15, 2022May 15, 2022
ShriPattern 1 : Sliding WindowGiven an array, find the average of all subarrays of ‘K’ contiguous elements in it.May 7, 2022May 7, 2022