Leet常用数据结构【LeetCode】
2016-07-12 08:25
351 查看
</pre><pre name="code" class="java">str.toCharArray(); str.getBytes(); String.valueOf(char c); str.charAt(index); str.startsWith(str1,k); str.replaceAll(" ","");str.substring(0,3); String[] strs = str.split(" "); Arrays.sort(chars); Arrays.copyOfRange(chars,0,3); integer.intValue(); integer.toString(); Integer.parseInt("12"); Long.parserLong("12"); map.put(key,value); map.get(key); map.containsKey(); for(String s:map.keySet()) Irerator it= map.entrySet().iterator(); while(iterator.hasNext()){ it.next().getKey(); it.next().getValue(); } list.add/get("aa"); Collections.sort(list); list.toArray(new Object[list.size()]); String[] str = list.toArray(new String[list.size()]); Queue queue = new LinkedList(); queue.offer/add("Hello"); queue.poll(); stack.push("aa"); stack.pop(); stack.peek(); set.contains/remove/add("no repeat");
相关文章推荐
- BZOJ3224 普通平衡树
- 【慢速学数据结构】优先队列(堆) 篇
- TreeSet实现Comparable接口覆写compareTo()方法
- 【数据结构】链表
- java数据结构-有序数组
- 【数据结构与算法】String 的简单实现
- HashSetDemo
- 数据结构——c语言描述 第六章(1)二叉树树的基本操作和二叉树的线索化
- 数据结构中时间复杂度和空间复杂度的理解
- Swift 3.0在集合类数据结构上的一些新变化总结
- 浅谈算法和数据结构(4):快速排序
- 浅谈算法和数据结构(3):合并排序
- 浅谈算法和数据结构(2):基本排序算法
- Android Binder机制(二) Binder中的数据结构
- 复习(数据结构):动态数组:c++_stl写法
- 数据结构关于AOV与AOE网的区别
- 二、数据结构与算法--数组
- 数据结构 二叉树的互相遍历求法
- RMQ问题——sparse-table算法
- 数据结构学习笔记(一)基础概念