摘要:
阅读全文
摘要:
Question:Given an M x N matrix in which each row and each column is sorted in ascending order, write a method to find an element. 1 package POJ; 2 3 ... 阅读全文
摘要:
Question:Given a sorted array of strings which is interspersed with empty strings, write a method to find the location of a given string. 1 package P... 阅读全文
摘要:
Question:Given a sorted array of n integers that has been rotated an unknown number of times, write code to find anelement in the array. You may assum... 阅读全文
摘要:
Question:Write a method to sort an array of strings so that all the anagrams are next to each other. 1 package POJ; 2 3 import java.util.Arrays; 4 im... 阅读全文
摘要:
http://blog.csdn.net/java2000_net/article/details/2512510http://blog.csdn.net/shohokuf/article/details/3932967 阅读全文
摘要:
Question:You are given two sorted arrays, A and B, where A has a large enough buffer at the end to hold B.Write a method to merge B into A in sorted o... 阅读全文
摘要:
1 package POJ; 2 3 public class Main { 4 5 /** 6 * 7 * QuickSort 8 * 9 */10 public static void main(String[] args) {1... 阅读全文
摘要:
1 package POJ; 2 3 public class Main { 4 5 /** 6 * 7 * MergeSort 8 * 9 */10 public static void main(String[] args) {1... 阅读全文
摘要:
Reference:http://www.cnblogs.com/sujz/archive/2011/06/16/2082831.html问题:给定字符串S,生成该字符串的全排列。方法1:依次从字符串中取出一个字符作为最终排列的第一个字符,对剩余字符组成的字符串生成全排列,最终结果为取出的字符和剩余... 阅读全文