码迷,mamicode.com
首页 >  
搜索关键字:list    ( 54897个结果
LeetCode: Remove Nth Node From End of List [019]
【题目】 Given a linked list, remove the nth node from the end of list and return its head. For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from the end, the linked list becomes 1->2->3->5. Note: Given n will ...
分类:其他好文   时间:2014-05-18 18:48:03    阅读次数:269
利用+=n连续保存或者输出n个数
for (int k = 0; k if (((k + 1) % 2) != 0) { m1 = (MealEntity) list.get(k); %> "> src="mealImg/.jpg" width="148" height="126" border="0" /> : 原价:人民币元 现价:人民币 元 "> ...
分类:其他好文   时间:2014-05-18 14:07:40    阅读次数:234
LeetCode: Reverse Nodes in k-Group [024]
【题目】 Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. If the number of nodes is not a multiple of k then left-out nodes in the end should remain as it is. You may not alter the values in the nodes, only n...
分类:其他好文   时间:2014-05-18 10:22:34    阅读次数:367
[矩阵+线段树] zoj 3772 Calculate the Function
题目链接: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5235 Calculate the Function Time Limit: 2 Seconds      Memory Limit: 65536 KB You are given a list of numbers A1 A2 .. AN...
分类:其他好文   时间:2014-05-18 09:52:49    阅读次数:410
LeetCode: Merge k Sorted Lists [022]
【题目】 Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 【题意】 合并K个有序链表 【思路】 归并 Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For ...
分类:其他好文   时间:2014-05-18 09:05:40    阅读次数:255
LeetCode: Swap Nodes in Pairs [023]
【题目】 Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1->2->3->4, you should return the list as 2->1->4->3. Your algorithm should use only constant space. You may not modify the values in the list, only nodes it...
分类:其他好文   时间:2014-05-18 08:37:57    阅读次数:370
LeetCode: Substring with Concatenation of All Words [029]
【题目】 You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenation of each word in L exactly once and without any intervening characters. For example, given: S:...
分类:其他好文   时间:2014-05-18 08:31:48    阅读次数:228
hibernate sql查询对象到map中
public List queryBySqlMap(String asql) {           final String sql = asql;           List lst = getHibernateTemplate().executeFind( new  HibernateCallback() {                 public  Object doInHi...
分类:数据库   时间:2014-05-18 08:07:09    阅读次数:378
leetcode -day17 Path Sum I II & Flatten Binary Tree to Linked List & Minimum Depth of Binary Tree
1、 ?? Path Sum Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. For example: Given the below...
分类:其他好文   时间:2014-05-18 03:25:06    阅读次数:301
C++ PRIMER 第九章
顺序容器:vector list deque顺序容器适配器: stack queue priority_quequ(没见过,第一轮不管)C c; C c(c2); C c(b,e) ///b e 都是迭代器; c(n,t)///只用于顺序容器; C c(n) ///只用于顺序容器const list...
分类:编程语言   时间:2014-05-17 23:43:37    阅读次数:471
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!