2014年8月21日

摘要: 1, LinkedListcomposed of one and one Node: [data][next].[head] ->[data][next] ->[data][next] ->[data][next] -> [null].Empty linkedList: head == null.V... 阅读全文

posted @ 2014-08-21 22:11 chayu3 阅读(126) 评论(0) 推荐(0) 编辑

摘要: 1, Binary SearchOn sorted array!public static int binarySearch(int e, int[] array, int low, int high) { while(low array[mid] && e array[low]) ... 阅读全文

posted @ 2014-08-21 21:58 chayu3 阅读(95) 评论(0) 推荐(0) 编辑

摘要: Time complexity:Binary search O(log2 n):i=0. n elements: -------------------i=1. n/2 elements: ----------i=2. n/4 elements: ... 阅读全文

posted @ 2014-08-21 21:51 chayu3 阅读(201) 评论(0) 推荐(0) 编辑