码迷,mamicode.com
首页 >  
搜索关键字:sorted list ii    ( 64619个结果
leetcode -- Flatten Binary Tree to Linked List
算法:1. 对root的左子树做处理,让左子树的根节点作为,根节点的右子树,并让右子树作为左子树根节点的右子树的子树2. 递归遍历右子树public void flatten(TreeNode root) { if(root==null){ return; ...
分类:其他好文   时间:2014-05-26 23:39:49    阅读次数:253
[leetcode]Copy List with Random Pointer @ Python
原题地址:https://oj.leetcode.com/problems/copy-list-with-random-pointer/题意:A linked list is given such that each node contains an additional random pointe...
分类:编程语言   时间:2014-05-26 23:16:12    阅读次数:368
【题解】【数组】【Leetcode】Median of Two Sorted Arrays
####Median of Two Sorted Arrays >There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overa...
分类:其他好文   时间:2014-05-26 23:13:41    阅读次数:265
myBatis批量添加,修改和删除
摘自:http://blog.csdn.net/myjlvzlp/article/details/84343761、批量添加元素session.insert(String string,Object o)public void batchInsertStudent(){ List ls = n...
分类:其他好文   时间:2014-05-26 22:43:20    阅读次数:239
导出excel
导出excel时,我以前使用的是POI,如下:public class Test { private void exportEXCEL(List d502s) { Field[] fields = d502s.get(0).getClass().getDeclaredFields...
分类:其他好文   时间:2014-05-26 22:30:03    阅读次数:383
2E08-view-lists-Array(overlay)
介绍一个list滑动时通过一个text提示Array首字母位置的应用 /* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file exce...
分类:其他好文   时间:2014-05-23 00:58:42    阅读次数:326
2E02-View-Lists-multiple -choice-list
介绍一个多选list /* * Copyright (C) 2008 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with th...
分类:其他好文   时间:2014-05-23 00:52:57    阅读次数:455
2E04-view-lists-slow-efficient-adapter
介绍自定一个的Adapter和list的监听 注意 1....
分类:其他好文   时间:2014-05-23 00:51:45    阅读次数:355
2E06-view-lists-separators
介绍通过方法 @Override public boolean areAllItemsEnabled() { return false; } @Override public boolean isEnabled(int position) { return !mStrings[position].startsWith("-"); } 设置list的可以选和不可选注意有...
分类:其他好文   时间:2014-05-22 23:08:09    阅读次数:388
一行代码的快速排序
很和谐精悍的一行快排代码quicksort1。 import random def quicksort( list ): if list == []: return [] else: cut = list[0] lesser = quicksort( [ x for x in list[1:] if x < cut ]...
分类:其他好文   时间:2014-05-22 22:33:19    阅读次数:402
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!