您的位置:首页 > 理论基础 > 数据结构算法

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");





                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: