摘要:
Problem statement Given a char array representing tasks CPU need to do. It contains capital letters A to Z where different letters represent different 阅读全文
摘要:
Problem statement Given a positive integer a, find the smallest positive integer b whose multiplication of each digit equals to a. If there is no answ 阅读全文
摘要:
Problem statement Given the root of a binary tree, then value v and depth d, you need to add a row of nodes with value v at the given depth d. The roo 阅读全文
摘要:
Problem statement Given m arrays, and each array is sorted in ascending order. Now you can pick up two integers from two different arrays (each array 阅读全文
摘要:
Problem statement Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space? Solution This is a cl 阅读全文
摘要:
Problem statement Given a singly linked list, determine if it is a palindrome. Follow up: Could you do it in O(n) time and O(1) space? Solution This i 阅读全文
摘要:
Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacen 阅读全文
摘要:
Given n items with size Ai and value Vi, and a backpack with size m. What's the maximum value can you put into the backpack? 阅读全文
摘要:
Problem statement: Given a positive integer n, find the number of non-negative integers less than or equal to n, whose binary representations do NOT c 阅读全文
摘要:
Problem statement: A zero-indexed array A consisting of N different integers is given. The array contains all integers in the range [0, N - 1]. Sets S 阅读全文