
刷题
49er
这个作者很懒,什么都没留下…
展开
-
leetcode刷题-链表#2
206.Reverse Linked List [easy]Reverse a singly linked list.Example:Input: 1->2->3->4->5->NULLOutput: 5->4->3->2->1->NULLFollow up:A linked list can be rever...原创 2019-06-25 16:51:09 · 130 阅读 · 0 评论 -
leetcode刷题-链表#3
61.Rotate List [medium]Given a linkedlist, rotate the list to the right bykplaces, wherekis non-negative.Example 1:Input: 1->2->3->4->5->NULL, k = 2Output: 4->5->1-&...原创 2019-06-26 23:11:54 · 157 阅读 · 0 评论 -
leetcode刷题-Array#1
1.Two SumGiven an array of integers, returnindicesof the two numbers such that they add up to a specific target.You may assume that each input would haveexactlyone solution, and you may not u...原创 2019-07-09 12:52:27 · 96 阅读 · 0 评论 -
leetcode刷题-链表#1
82.Remove Duplicates from Sorted List II [medium]Given a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list.Example 1:Input:...原创 2019-06-24 23:08:54 · 132 阅读 · 0 评论 -
leetcode刷题-Array#2
11.Container With Most Water [medium]Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoints of l...原创 2019-07-09 20:08:39 · 174 阅读 · 0 评论 -
leetcode刷题-Array#3
18.4SumGiven an arraynumsofnintegers and an integertarget, are there elementsa,b,c, anddinnumssuch thata+b+c+d=target? Find all unique quadruplets in the array which gives the s...原创 2019-07-11 17:52:03 · 123 阅读 · 0 评论 -
谷歌kickstart 2018 round B
这次只要做出第一题和后两题的小数据集就可以去谷歌面试啦。后两题大数据集有点超过我的能力范围了,跳过跳过。Problem: No Nine (7pts, 13pts)No Nine is a counting game that you can try when you are bored. In this game, you are only allowed to say numbers ...原创 2019-07-16 14:39:31 · 402 阅读 · 1 评论 -
谷歌kickstart 2018 round A
这一轮比较简单,只要拿到51分就可以去面试了。也就是第一题和后两题的第一问。Problem1 Even Digits (8pts, 15pts)Supervin has a unique calculator. This calculator only has a display, a plus button, and a minus button. Currently, the int...原创 2019-07-19 14:58:21 · 524 阅读 · 0 评论 -
leetcode刷题-Array#4
33.Search in Rotated Sorted ArraySuppose an array sorted in ascending order 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]).You are given...原创 2019-07-20 21:09:13 · 91 阅读 · 0 评论