摘要:
problem:Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents you... 阅读全文
摘要:
problem:Given a list of non negative integers, arrange them such that they form the largest number.For example, given [3, 30, 34, 5, 9], the largest f... 阅读全文
摘要:
Factorial Trailing ZeroesGiven an integern, return the number of trailing zeroes inn!.Note:Your solution should be in logarithmic time complexity.Cred... 阅读全文
摘要:
Problem:Rotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,... 阅读全文
摘要:
problem: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 occ... 阅读全文
摘要:
problem:Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive... 阅读全文
摘要:
Problem:Reverse a linked list from position m to n. Do it in-place and in one-pass. For example:Given 1->2->3->4->5->NULL, m = 2 and n = 4,return 1->4... 阅读全文
摘要:
Problem:Description:Count the number of prime numbers less than a non-negative number, n.Credits:Special thanks to @mithmatt for adding this problem a... 阅读全文