摘要:
Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a g 阅读全文
摘要:
Given a non empty integer array of size n, find the minimum number of moves required to make all array elements equal, where a move is incrementing n 阅读全文
摘要:
Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements of [1, n] 阅读全文
摘要:
Given n points in the plane that are all pairwise distinct, a “boomerang” is a tuple of points (i, j, k) such that the distance between iand j equals 阅读全文
摘要:
Given a non empty array containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both 阅读全文
摘要:
Given two non negative integers num1 and num2 represented as string, return the sum of num1 and num2. Note: + The length of both num1 and num2 is =0; 阅读全文
摘要:
A sequence of number is called arithmetic if it consists of at least three elements and if the difference between any two consecutive elements is the 阅读全文
摘要:
Write a program that outputs the string representation of numbers from 1 to n. But for multiples of three it should output “Fizz” instead of the numbe 阅读全文
摘要:
Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters. This 阅读全文
摘要:
Find the sum of all left leaves in a given binary tree. Example: 阅读全文