K Closest Points to Origin
Given an array of points where each point is represented as points[i] = [xi, yi] on the X-Y plane and an integer k, […]
Given an array of points where each point is represented as points[i] = [xi, yi] on the X-Y plane and an integer k, […]
Serialization is to store a tree in an array so that it can be later restored and deserialization is reading
Given a Binary Search Tree (with all values unique) and two nodes n1 and n2 (n1 != n2). You may assume that both nodes exist
Given the root of a Binary search tree(BST), where exactly two nodes were swapped by mistake. Your task is to fix (or correct) the
Given a Binary Search Tree(BST) and a target. Check whether there’s a pair of Nodes in the BST with value summing
Given a BST and an integer k, the task is to find the kth smallest element in the BST. If there is no kth
Given a binary tree and an integer k, determine the number of downward-only paths where the sum of the node values in the path equals k.
Given a binary tree, the diameter (also known as the width) is defined as the number of edges on the longest path between two
You are given a two-dimensional mat[][] of size n*m containing English alphabets and a string word. Check if the word exists on the mat. The word
Implement the function power(b, e), which calculates b raised to the power of e (i.e. be). Examples: Input: b = 3.00000, e = 5Output: 243.00000
Given a string s, which may contain duplicate characters, your task is to generate and return an array of all unique permutations of