Tag: coding exercise
Question: Given an unsorted list of integers, find out the first missing positive. Problem Description: http://oj.leetcode.com/problems/first-missing-positive/ Examples: should return 3; should return 2. Can you do it with O(n) …
Source: http://oj.leetcode.com/problems/powx-n/ Implement Pow(x, n) which computes The given parameter x is a 64-bit double and n is a 32-bit integer. The quick solution may be so obvious, using bruteforce, iterate n times that multiplies x and gives a straightforward result. class Solution …
A Palindrome string is a string that mirrors itself, for example, ’12a21′ reverse is the same string and ‘abcde’ is not. A Palindrome number is a integer number that …
Question: Given a number (integer) stored in an array of digits int digits Plus one and return the new array. Source: http://oj.leetcode.com/problems/plus-one/ The number is written from left to right, so for …
The problem is from codeforces http://codeforces.com/problemset/problem/221/B The problem statement is clear. The answer is to count the number of divisors that has at least one common digit with the …