摘要:
Source Given a sorted linked list, delete all duplicates such that each element appear only once. Example Given 1->1->2, return 1->2. Given 1->1->2->3 阅读全文
摘要:
Problem Description Given a char array representing tasks CPU need to do. It contains capital letters A to Z where different letters represent differe 阅读全文
摘要:
Problem Determine whether an integer is a palindrome. Do this without extra space. click to show spoilers. Some hints: Could negative integers be pali 阅读全文
摘要:
Source Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant dig 阅读全文
摘要:
Source Ugly number is a number that only have factors 3, 5 and 7. Design an algorithm to find the Kth ugly number. The first 5 ugly numbers are 3, 5, 阅读全文
摘要:
Source Count the number of k's between 0 and n. k can be 0 - 9. Example if n=12, k=1 in [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], we have FIVE 1's ( 阅读全文
摘要:
Source Given an array of integers and a number k, the majority number is the number that occurs more than 1/k of the size of the array. Find it. Examp 阅读全文
摘要:
Source Given an array of integers, the majority number is the number that occurs more than 1/3 of the size of the array. Find it. Example Given [1, 2, 阅读全文
摘要:
Source Given an array of integers, the majority number is the number that occurs more than half of the size of the array. Find it. Example Given [1, 1 阅读全文
摘要:
Source Print numbers from 1 to the largest number with N digits by recursion. Example Given N = 1, return [1,2,3,4,5,6,7,8,9]. Given N = 2, return [1, 阅读全文