每日一贴: http://www.mitbbs.com/article_t/JobHunting/33072385.html
hedge fund 1: 1. Write a function that takes as input integers P and Q and returns P to the power of Q. Note any assumptions you make and the complexity of the algorithm. We expect you to do better than O(Q). 2. Write a function that takes as input an array of 1 million integers, such that 1 ≤ x ≤ 10 for every element x in the array, and returns the sorted array. The sort does not need to occur in-place. Obviously you can just call a standard sorting function like quicksort, but can you do better? 3. You are given an alphanumeric string. Write an algorithm that will segment the string into substrings of consecutive integers or numbers and then sort the substrings. For example, the string “AZQF013452BAB” will result in “AFQZ012345ABB”. 4. Write a function to determine the largest palindromic subsequence of a string. A palindromic string is a string which is the same when read in either the forward or reverse direction. For example,Read full article from 每日一贴: http://www.mitbbs.com/article_t/JobHunting/33072385.html
No comments:
Post a Comment