CC150 chapter 1 Arrays and strings.

CC150 chapter 1 总结

1

HashTable:  实质是Array. 如何实现HashTable 在Java中

Here is the way that implments the hash table. A hashtable is a array of listnode. and the time complexity for all the basic operation including search, add and remove  is O(1).

Here is how to implement the hashtable


http://math.hws.edu/javanotes/c10/ex3-ans.html. 

when the number of the hashtable elements exceeds the 0.75* the length of the hashtable. then we need to rehash it.


ArrayList  是一个长度可变的数组

http://www.tutorialspoint.com/java/java_arraylist_class.htm


StringBuffer 实现了一个String数组,是一个String , 通常当对String多次操作时,选用StringBuffer 可以节省程序空间


1 题目 implement a determine a if all the chars in a string are unique, use the array for 32 bits. boolean judge = new judge[32];


2 decide if a string is a permutation of the other.  use the int[]数组统计。注意首先进行长度的判断


3 rotate a image.


4judge if the string is a rotated version of the other s1s1 ,s2 judge is substring. 

method how to judge if this is substring.?


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值