摘要: Giving a string with number from 1 to n in random order, but miss 1 number.Find that number. You can assume n <= 30 Giving a string with number from 1 阅读全文
posted @ 2017-07-21 14:15 Review->Improve 阅读(862) 评论(0) 推荐(0)
摘要: Given an array contains N numbers of 0 .. N, find which number doesn't exist in the array. Given an array contains N numbers of 0 .. N, find which num 阅读全文
posted @ 2017-07-21 11:14 Review->Improve 阅读(576) 评论(0) 推荐(0)
摘要: Given an unsorted integer array, find the first missing positive integer. Given an unsorted integer array, find the first missing positive integer. Gi 阅读全文
posted @ 2017-07-21 07:05 Review->Improve 阅读(466) 评论(8) 推荐(1)
摘要: Given an integer x, write a method that multiplies x with 3.5 and returns the integer result. You are not allowed to use %, /, or *. Examples: input 2 阅读全文
posted @ 2017-07-20 06:53 Review->Improve 阅读(130) 评论(0) 推荐(0)
摘要: Given an array arr[0.....n-1] containing n positive integers, find the length of the longest bitonic subsequence. A subsequence of arr[] is called Bit 阅读全文
posted @ 2017-07-20 06:41 Review->Improve 阅读(488) 评论(0) 推荐(0)
摘要: Given an unsorted array of integers, sort the array into a wave like array. An array arr[0...n-1] is sorted in wave form if arr[0] >= arr[1] <= arr[2] 阅读全文
posted @ 2017-07-20 00:08 Review->Improve 阅读(266) 评论(0) 推荐(0)
摘要: Given a sequence of integers, find the longest increasing subsequence (LIS). You code should return the length of the LIS. Clarification What's the de 阅读全文
posted @ 2017-07-19 10:40 Review->Improve 阅读(250) 评论(0) 推荐(0)
摘要: Given an unsorted array of integers, find the length of the longest consecutive elements sequence. Given an unsorted array of integers, find the lengt 阅读全文
posted @ 2017-07-19 06:08 Review->Improve 阅读(192) 评论(0) 推荐(0)
摘要: Implement a load balancer for web servers. It provide the following functionality: Add a new server to the cluster => add(server_id). Remove a bad ser 阅读全文
posted @ 2017-07-19 04:27 Review->Improve 阅读(1012) 评论(0) 推荐(0)
摘要: Given a sorted integer array where the range of elements are in the inclusive range [lower, upper], return its missing ranges. Given a sorted integer 阅读全文
posted @ 2017-07-19 01:05 Review->Improve 阅读(529) 评论(0) 推荐(0)