Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (rep...
Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (rep...
Given a singly linked list, determine if it is a palindrome. Solution1: no change to or...
The thief has found himself a new place for his thievery again. There is only one entra...
Compare two version numbers version1 and version2. If version1 > version2 return 1, if ...
Find the nth digit of the infinite integer sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ...
Given a linked list, remove the nth node from the end of list and return its head.For e...
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determin...
Given a pattern and a string str, find if str follows the same pattern. Here follow mea...
Given a sorted array, remove the duplicates in place such that each element appear only...
Implement the following operations of a queue using stacks.push(x) -- Push element x to...
Given a binary tree, find its minimum depth. The minimum depth is the number of nodes a...
Given an integer n, return the number of trailing zeroes in n!.**Note: **Your solution ...
Remove all elements from a linked list of integers that have value val.ExampleGiven: 1 ...
Design a stack that supports push, pop, top, and retrieving the minimum element in cons...
You are playing the following Bulls and Cows game with your friend: You write down a nu...
Given a binary tree, return the level order traversal of its nodes' values. (ie, from l...
Given a binary tree, determine if it is height-balanced. For this problem, a height-bal...
Given two strings s and t, determine if they are isomorphic.Two strings are isomorphic ...