![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
interview
文章平均质量分 86
wmy512
这个作者很懒,什么都没留下…
展开
-
Sort List | leetcode
Sort List My SubmissionsSort a linked list in O(n log n) time using constant space complexity.Discuss{:CODE:73149}原创 2013-11-17 18:22:20 · 1229 阅读 · 1 评论 -
LRU Cache | leetcode
LRU Cache Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set.get(key) - Get the value (will always be posi原创 2013-11-11 10:15:35 · 720 阅读 · 0 评论 -
Insertion Sort List | leetcode
Sort a linked list using insertion sort.原创 2013-11-13 21:17:47 · 436 阅读 · 0 评论 -
Evaluate Reverse Polish Notation | leetcode
Evaluate Reverse Polish Notation Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are +, -, *, /. Each operand may be an integer or another expre原创 2013-11-28 21:37:16 · 763 阅读 · 0 评论 -
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.以每个点为中心,然后遍历剩余点,找到所有的斜率,如果斜率相同,那么一定共线,每次更新最大点数,最后就是结果。排序O(nlog(n))再乘以n个点,总复杂度O(n2logn)原创 2013-11-24 12:24:49 · 1330 阅读 · 2 评论 -
Reverse Words in a String
Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".#include #include #include using namespace std;/* 1. 空原创 2014-03-18 23:51:54 · 437 阅读 · 0 评论