LintCode
memcpy0
希望探索文理结合的自由之路。
展开
-
LeetCode C++ 1051. Height Checker【Array】简单
Students are asked to stand in non-decreasing order of heights for an annual photo. Return the minimum number of students not standing in the right positions. (This is the number of students that must move in order for all students to be standing in non-.原创 2020-09-14 22:36:46 · 154 阅读 · 0 评论 -
LintCode C++ 82. Single Number【Bit Manipulation】简单
Given 2 * n + 1 numbers, every numbers occurs twice except one, find it. Example 1: Input:[1,1,2,2,3,4,4] Output:3 Explanation: Only 3 appears once Example 2: Input:[0,0,1] Output:1 Explanation: Only 1 appears once Challenge:One-pass, constant extra spac原创 2020-11-05 01:23:31 · 147 阅读 · 0 评论 -
LintCode C++ 1740. Online Stock Span【单调栈/队列】中等
Write a class StockSpanner which collects daily price quotes for some stock, and returns the span of that stock’s price for the current day. The span of the stock’s price today is defined as the maximum number of consecutive days (starting from today and g原创 2020-07-24 22:35:55 · 150 阅读 · 0 评论