Question : Given an array of integers A, return the largest integer that only occurs once. If no integer occurs once,…
Jump search algorithm is a pretty new algorithm to search for an element in a sorted array. The idea of…
What is Knuth Morris Pratt or KMP algorithm ? KMP is an algorithm which is used in the applications of…
Binary Search is a Logarithmic search which finds the target element in a sorted array in O(logN) times compared to…
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 V 5 X 10 L 50 C 100…
Given n non-negative integers a1, a2, ..., an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of…
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level…
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only…
Given a list of airline tickets represented by pairs of departure and arrival airports [from, to], reconstruct the itinerary in order.…
Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum…
This website uses cookies.