摘要: Question:Given a sorted array of n integers that has been rotated an unknown number of times, give an O(log n) algorithm that finds an element in the ... 阅读全文
posted @ 2014-11-14 00:34 小Tra1999 阅读(148) 评论(0) 推荐(0)
摘要: Question: Write a method to sort an array of strings so that all the anagrams are next to eachother.It's similar to Anagrams leetcode Java. Given an... 阅读全文
posted @ 2014-11-13 12:07 小Tra1999 阅读(123) 评论(0) 推荐(0)
摘要: You are given two sorted arrays, A and B, and A has a large enough buffer at the endto hold B. Write a method to merge B into A in sorted order.First ... 阅读全文
posted @ 2014-11-13 10:55 小Tra1999 阅读(148) 评论(0) 推荐(0)
摘要: You have a basketball hoop and someone says that you can play 1 of 2 games.Game #1: You get one shot to make the hoop.Game #2: You get three shots an... 阅读全文
posted @ 2014-11-13 10:24 小Tra1999 阅读(150) 评论(0) 推荐(0)