Questions asked in Amazon
Create a function `sum` that implements currying. Currying is a transformation of functions that translates a function from being callable as f(x, y, ...
Create a feedback rating component that takes in a number of stars and outputs the corresponding star SVGs on the output window. When the user clicks ...
Branch Sums in a Binary Tree
Given a Binary Tree, compute the sum of all the branches in the tree. 1 branch is the path from the root to a leaf.
Memoization is a way for a function to remember or cache the results. Given an expensive function that takes a long time to compute for the same resul...
Create a Job Feed page where the latest job postings are fetched from the Hackernews API. On clicking the job posting, the user should be able to land...
Given a data object resembling a folder structure, create a folder structure UI resembling that of VS code with appropriate functionalities.
Toasts And Notifications
Toasts are the small little notification messages that popup on front-end applications to notify the user of some current actions that have happened. ...
Kth Largest in a BST
Find Kth largest in a BST - Given a BST and a number k, find the kth largest element in the BST.
Given an array of sorted integers in ascending order, and a target integer, write a function to search target in nums array. If target exists, return ...
Given the root of a binary tree and a node in it, return the in-order successor of that node in the BST. If the given node has no in-order successor i...
Given a string of alphabets (from a to z), Print the count of the character appearing in the string right next to it. This is also called Run Length E...
Given two arrays of integers, find the pair of values (one value in each array) with the smallest (non-negative) difference.
Countries List with Debounce
Debouncing is a method of preventing a function from being invoked too often, and instead of waiting a certain amount of time until it was last called...
Construct a Binary Search Tree and implement that implements insert, search, traverse and delete methods.
Depth First Search
Depth-first search (DFS) is an algorithm for traversing or searching tree or graph data structures. The algorithm starts at the root node (selecting s...
Minimum Number Of Coins To Make Change
Given an array of coins or denominations and a target sum, calculate the minimum number of coins required to match the total. Note that the coins arra...
Given 2 strings, find the minimum number of operations required to change one string to the other. An operation is defined as either replacement of a ...
Given an integer n, return the nth Fibonacci number. In mathematics, the Fibonacci numbers form a sequence called the Fibonacci sequence - In which ea...