Hash
永远的EMT
每天时刻保持超越自我的意识
展开
-
【PAT】1057. Stack
考查点:分块思想,用hash记录push和pop情况 #define LOCAL #include #include #include #include #include #include #include #include #include #include #include #define FOR(i, x, y) for(int i = x; i <= y; i++)原创 2017-02-21 16:36:07 · 305 阅读 · 0 评论 -
【LeetCode】128. Longest Consecutive Sequence
Given an unsorted array of integers, find the length of the longest consecutive elements sequence. Your algorithm should run in O(n) complexity. Example: Input: [100, 4, 200, 1, 3, 2] Output: 4 Ex...原创 2018-10-16 00:30:07 · 172 阅读 · 0 评论