摘要: sorting 应该是最容易被考到的东西,自己老是学了背,背了忘。为了方便复习,这里进行总结 1. Bubble Sort 定义:每两个两个比较,每扫完一次,当前扫过的最大值放在了末尾。 for i = (n-1) to 1 for j = 0 to i-1 if(A[j] > A[j+1]) sw 阅读全文
posted @ 2016-02-01 06:39 wendyfly 阅读(281) 评论(0) 推荐(0)
摘要: 今天在复习Arrays and String 时看到一个很有趣的问题。希望跟大家分享一下。Implement the hash table using array / binary search tree1. Using Array/LinkedList:1) key需要通过hash 来得到arra... 阅读全文
posted @ 2016-01-26 12:53 wendyfly 阅读(238) 评论(0) 推荐(0)