摘要: 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 阅读(126) 评论(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 阅读(467) 评论(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 阅读(257) 评论(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 阅读(228) 评论(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 阅读(175) 评论(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 阅读(993) 评论(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 阅读(515) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two n 阅读全文
posted @ 2017-07-19 00:42 Review->Improve 阅读(325) 评论(0) 推荐(0) 编辑
摘要: Given an integer array, find a subarray where the sum of numbers is in a given interval. Your code should return the number of possible answers. (The 阅读全文
posted @ 2017-07-19 00:16 Review->Improve 阅读(803) 评论(0) 推荐(0) 编辑
摘要: Design and implement a TwoSum class. It should support the following operations: add and find. add - Add the number to an internal data structure.find 阅读全文
posted @ 2017-07-18 07:18 Review->Improve 阅读(413) 评论(0) 推荐(0) 编辑