Category: algorithms
We have a list of points on the plane. Find the K closest points to the origin (0, 0). (Here, the distance between two points on a plane is …
A message containing letters from A-Z is being encoded to numbers using the following mapping: ‘A’ – 1 ‘B’ – 2 … ‘Z’ – 26 Given a non-empty string …
Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters. This is case sensitive, for …
Given a tree, rearrange the tree in in-order so that the leftmost node in the tree is now the root of the tree, and every node has no left …
Given a positive integer num, write a function which returns True if num is a perfect square else False. Note: Do not use any built-in library function such as …