A Distributed Coordination Service for Distributed Applications ZooKeeper is a distributed, open-source coordination service for distributed applications. It uses a data model styled after the familiar directory tree structure of file systems. Design Goals ZooKeeper is simple. ZooKeeper allows distributed processes to coordinate with each other through a shared hierarchical […]
SDE II Amazon
Bengaluru, Karnataka, India
Given a square chessboard of N x N size, and given any source point, (X1, Y1) and destination point, (X2, Y2) on the chessboard, we need to find whether a Knight can move to the destination or not from the source point.
Given a collection of numbers, nums, that might contain duplicates, return all possible unique permutations in any order.
Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order.
The Dutch national flag problem is a computer science programming problem proposed by Edsger Dijkstra. The flag of the Netherlands consists of three colors: red, white and blue
Given the root of a binary tree, each node in the tree has a distinct value. After deleting all nodes with a value in to_delete, we are left with a forest
In a Binary Tree, the root node is at level 0, and children of each depth k node are at depth k+1. Two nodes of a binary tree are cousins if they have the same depth, but have different parents
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.
Once you pay the cost, you can either climb one or two steps. You need to find minimum cost to reach the top of the floor, and you can either start from the step with index 0, or the step with index 1.
Given a binary tree and a sum, find all root-to-leaf paths where each path’s sum equals the given sum. Note: A leaf is a node with no children.