LeetCode 解题报告
文章平均质量分 81
醉醉Philip
爱好广泛,喜欢尝试新鲜事物。博而不专的典型代表,正在学习Linux,Unity略懂,PHP略懂,视频略懂。两年ACMer。
展开
-
[LeetCode] Binary Watch
A binary watch has 4 LEDs on the top which represent the hours (0-11), and the 6 LEDs on the bottom represent the minutes (0-59).Each LED represents a zero or one, with the least significant bit原创 2017-09-20 14:54:25 · 218 阅读 · 0 评论 -
[LeetCode] Poor Pigs
There are 1000 buckets, one and only one of them contains poison, the rest are filled with water. They all look the same. If a pig drinks that poison it will die within 15 minutes. What is the minimum原创 2017-11-09 14:28:03 · 299 阅读 · 0 评论 -
[LeetCode] Subtree of Another Tree
题目链接:点击打开链接Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of s. A subtree of s is a tree consists of a node in s and原创 2017-11-14 14:27:16 · 226 阅读 · 0 评论 -
[LeetCode] Intersection of Two Linked Lists
Write a program to find the node at which the intersection of two singly linked lists begins.For example, the following two linked lists:A: a1 → a2 ↘原创 2017-11-29 11:30:55 · 181 阅读 · 0 评论 -
TinyURL记录
之前去网易游戏面试,结果凉了。当时面试官问了我一个问题:如何实现一个短网址(Tiny url)系统。当时我只说是建立一个映射,就跟哈希表的原理差不多。然后面试官问我用较短的网址去映射那么多的较长的网址,短网址够用吗?我当时理所当然地觉得:不够用,很快就否认了自己先前的想法。然后就慌了,接下来基本上啥也没说上来。。。后来上网查这个问题的做法,发现LeetCode就有= =,而且其实思原创 2017-12-26 15:51:21 · 407 阅读 · 0 评论