Maximum sum path on a 2d grid . Binary Tree, LinkedList, Array, DP Nth Smallest Number in Array Check if the Binary Tree is Binary Search Tree
• C1) Given an array of integers, find the longest subarray that has a sum less than or equal to a given target value.
• C2) Design a system that can efficiently ingest data from a streaming source, such as a web API, and store it in a data warehouse, such as Snowflake. Consider the scalability, reliability, and performance of the system.
• C1) Implement a function that takes a string as input and returns the number of words in the string, where a word is defined as a sequence of alphanumeric characters separated by spaces or punctuation marks.
• C2) Write code that can normalize and deduplicate data from different sources, such as CSV, JSON, XML, etc., and transform them into a standard schema.
• C1) Given a binary tree, write a function that returns the level order traversal of its nodes' values, where each level is separated by a newline.
• C2) Write code that can handle schema drift, such as adding, deleting, or renaming columns, in the data sources and the data warehouse, and update the data accordingly.
1)longest subarray up to target 2) maximum sum path 3) wordCount 4) level order
// do a summary of https://hackernoon.com/14-patterns-to-ace-any-coding-interview-question-c5bb3357f6ed Summary: • Sliding Window: This pattern is used to perform a required operation on a specific window size of a given array or linked list, such as finding the longest subarray with a given sum.
• Two Pointers: This pattern is used to iterate over an array or a linked list in a way that helps to reduce the problem space, such as finding a pair of elements that add up to a given value.
• Fast and Slow Pointers: This pattern is used to traverse a linked list or an array when there are cyclic dependencies, such as finding the middle of a linked list or detecting a cycle in a linked list.
• Merge Intervals: This pattern is used to deal with overlapping intervals, such as merging all overlapping intervals or finding the maximum number of intervals that can be executed on a single machine.
• Cyclic Sort: This pattern is used to sort an array containing numbers in a given range, such as sorting an array of numbers from 1 to n or finding the missing number in an array.
• In-place Reversal of a Linked List: This pattern is used to reverse the nodes of a linked list without using any extra space, such as reversing a linked list or reversing every k elements of a linked list.
• Tree Breadth First Search: This pattern is used to traverse a tree in a level-by-level order, such as finding the level order traversal of a binary tree or finding the minimum depth of a binary tree.
• Tree Depth First Search: This pattern is used to traverse a tree in a depth-first order, such as finding the path sum of a binary tree or finding the diameter...
• Two Heaps: This pattern is used to manage a set of numbers and find the median, minimum, or maximum of the set at any time, such as finding the median of a stream of numbers or finding the kth smallest number in a set.
• Subsets: This pattern is used to generate all the subsets of a given set, such as finding all the subsets of a set or finding all the permutations of a string.
• Modified Binary Search: This pattern is used to perform a binary search on a sorted array that has some modifications, such as finding the first or last occurrence of a number or finding the peak element in an array.
• Bitwise XOR: This pattern is used to perform operations on bits, such as finding the single number in an array where every number appears twice or finding the two numbers in an array where every number appears twice except for two numbers.
• Top K Elements: This pattern is used to find the top k elements in an unsorted array or a stream, such as finding the kth largest element...
• Minimum Swaps 2 This is a challenge that tests your ability to sort an array of integers using the minimum number of swaps. You need to write a function that returns the number of swaps required to sort the array in ascending order.
• Sherlock and Anagrams This is a challenge that tests your ability to find the number of pairs of substrings of a given string that are anagrams of each other. You need to write a function that returns the number of such pairs.
• Frequency Queries This is a challenge that tests your ability to perform different types of queries on a collection of integers. You need to write a function that returns an array of integers where each element is the answer to a query of type 3. A query of type 3 asks you to check if any integer is present whose frequency is exactly equal to a given value.
• [Matrix Layer Rotation]: This is a challenge that tests your ability to rotate the elements of a matrix by a given number of rotations.
• [Encryption]: This is a challenge that tests your ability to encrypt a message using a square grid of letters.
• [The Coin Change Problem]: This is a challenge that tests your ability to find the number of ways to make change for a given amount using a given set of coins.
• [Structuring the Document]: This is a challenge that tests your ability to create and manipulate a document structure using structs and pointers.
• [Post Transition]: This is a challenge that tests your ability to write a function that performs a post-order traversal of a binary tree and prints the data of each node.