
leecode编程练习
勇敢的花儿
关于工作:过去5年两段三维结构光创业合伙人,目前在一家国内top10以内的双目自动驾驶解决方案公司,做vslam
关于未来:专注视觉!!!
关于生活:勇敢、真诚、善良、积极地生活
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
重新排列链表Reorder List
在leetcode中题目是这样描述的: Given a singly linked list L: L0→L1→…→Ln-1→Ln, reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You must do this in-place without altering the nodes' values. For example, Given {1原创 2014-07-15 11:26:08 · 507 阅读 · 1 评论 -
Max Points on a Line
leetcode上一道很少有人做出来的题: Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. 一开始就想到了原创 2014-10-21 12:40:51 · 398 阅读 · 0 评论 -
Word Break II
Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word. Return all such possible sentences. For example, given s = "原创 2014-10-28 15:35:41 · 610 阅读 · 0 评论 -
Single Number II
Given an array of integers, every element appears three times except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it without usi原创 2014-10-28 15:51:55 · 383 阅读 · 0 评论 -
Copy List with Random Pointer
A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null. Return a deep copy of the list. 这是照着这个silu原创 2014-10-29 07:45:05 · 448 阅读 · 0 评论 -
Single Number
Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it without using ext原创 2014-10-28 15:48:42 · 362 阅读 · 0 评论 -
Word Break
Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words. For example, given s = "leetcode", dict = ["leet"原创 2014-10-28 15:44:20 · 370 阅读 · 0 评论 -
Linked List Cycle II
Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Follow up: Can you solve it without using extra space? 上一篇说到原创 2014-10-22 15:58:26 · 380 阅读 · 0 评论 -
Linked List Cycle
判断一个单链表里是否有循环,这个问题以前zai原创 2014-10-22 15:55:22 · 368 阅读 · 0 评论 -
单链表的插入排序
单链表的插入排序与数组,顺序lieb原创 2014-07-15 08:21:16 · 545 阅读 · 0 评论 -
单链表的归并排序
单链表的归并排序的归并排序的时间fuza原创 2014-07-15 08:25:20 · 477 阅读 · 0 评论 -
逆波兰表达式求值
我们此时维护一个数据结果栈S3,我们将会看到该栈中最后存放的是最终的表达式的值。我们从左至右的遍历栈S1,然后按照下面的规则进行操作栈S3. (1)如果遇到的是数字,那么直接将数字压入到S3中; (2)如果遇到的是单目运算符,那么取S3栈顶的一个元素进行单目运算之后,将结果再次压入到栈S3中; (3)如果遇到的是双目运算符,那么取S3栈顶的两个元素进行,首先出栈的在左,后出栈的在原创 2014-07-03 12:26:03 · 484 阅读 · 0 评论 -
Find Minimum in Rotated Sorted Array
题目是这样的: Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). Find the minimum element. You may assume no duplica原创 2014-10-21 12:50:02 · 350 阅读 · 0 评论