摘要:
Numbers can be regarded as product of its factors. For example, Write a function that takes an integer n and return all possible combinations of its f 阅读全文
摘要:
Write a function that takes a string as input and reverse only the vowels of a string. Example 1: Given s = "hello", return "holle". Example 2: Given 阅读全文
摘要:
Given a string, we can "shift" each of its letter to its successive letter, for example: "abc" -> "bcd". We can keep "shifting" which forms the sequen 阅读全文
摘要:
Given a binary tree, return all root-to-leaf paths. For example, given the following binary tree: All root-to-leaf paths are: Credits:Special thanks t 阅读全文
摘要:
You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what the number is. Each time 阅读全文
摘要:
Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the characters in s can be replaced to get t. All occurrenc 阅读全文
摘要:
Implement the following operations of a queue using stacks. push(x) -- Push element x to the back of queue. pop() -- Removes the element from in front 阅读全文
摘要:
Implement the following operations of a stack using queues. push(x) -- Push element x onto stack. pop() -- Removes the element on top of the stack. to 阅读全文
摘要:
Description: Count the number of prime numbers less than a non-negative number, n. Credits:Special thanks to @mithmatt for adding this problem and cre 阅读全文
摘要:
Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), retur 阅读全文