上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 15 下一页
摘要: 题目描述:(链接)Given a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list.For example,Give... 阅读全文
posted @ 2015-10-26 17:52 skycore 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 具体描述见《统计学习方法》第三章。 1 // 2 // main.cpp 3 // kNN 4 // 5 // Created by feng on 15/10/24. 6 // Copyright © 2015年 ttcn. All rights reserved. 7 //... 阅读全文
posted @ 2015-10-25 15:46 skycore 阅读(230) 评论(0) 推荐(0) 编辑
摘要: 题目描述:(链接)Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -... 阅读全文
posted @ 2015-10-23 23:17 skycore 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 题目描述:(链接)Given a sorted linked list, delete all duplicates such that each element appear onlyonce.For example,Given1->1->2, return1->2.Given1->1->2->3... 阅读全文
posted @ 2015-10-22 23:19 skycore 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 题目描述:(链接)Given a linked list and a valuex, partition it such that all nodes less thanxcome before nodes greater than or equal tox.You should preserve ... 阅读全文
posted @ 2015-10-22 23:06 skycore 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 题目描述:(链接)Given an array of sizen, find the majority element. The majority element is the element that appears more than⌊ n/2 ⌋times.You may assume tha... 阅读全文
posted @ 2015-10-21 11:26 skycore 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 题目描述:(链接)Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the fa... 阅读全文
posted @ 2015-10-21 10:54 skycore 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 题目描述:(链接)Reverse a singly linked list.解题思路:链表真讨厌,总是出错。头插法。 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 *... 阅读全文
posted @ 2015-10-20 23:30 skycore 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 题目描述:(链接)Reverse a linked list from positionmton. Do it in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m= 2 andn= 4,return1->4->3->2->5... 阅读全文
posted @ 2015-10-20 22:59 skycore 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 题目描述:(链接):Given an arraynums, write a function to move all0's to the end of it while maintaining the relative order of the non-zero elements.For examp... 阅读全文
posted @ 2015-10-18 17:11 skycore 阅读(111) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 15 下一页