09 2018 档案
leetcode 910. Smallest Range II
摘要:Given an array A of integers, for each integer A[i] we need to choose either x = K or x = K, and add x to A[i] (only once). After this process, we hav 阅读全文
posted @ 2018-09-24 19:14 Beserious 阅读(407) 评论(0) 推荐(0) 编辑
leetcode 908. Smallest Range I
摘要:Given an array A of integers, for each integer A[i] we may choose any x with K & A, int K) { int a = INT_MAX; int b = INT_MIN; for (int i = 0; i 阅读全文
posted @ 2018-09-24 16:08 Beserious 阅读(142) 评论(0) 推荐(0) 编辑
leetcode 900. RLE Iterator
摘要:Write an iterator that iterates through a run length encoded sequence. The iterator is initialized by RLEIterator(int[] A), where A is a run length en 阅读全文
posted @ 2018-09-09 15:20 Beserious 阅读(260) 评论(0) 推荐(0) 编辑
leetcode 901. 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 阅读全文
posted @ 2018-09-09 15:19 Beserious 阅读(269) 评论(0) 推荐(0) 编辑
leetcode 102. Binary Tree Level Order Traversal
摘要:Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). bfs层序遍历整颗树。 阅读全文
posted @ 2018-09-03 16:48 Beserious 阅读(180) 评论(0) 推荐(0) 编辑
leetcode 72. Edit Distance
摘要:Given two words word1 and word2, find the minimum number of operations required to convert word1 to word2. You have the following 3 operations permitt 阅读全文
posted @ 2018-09-02 12:13 Beserious 阅读(173) 评论(0) 推荐(0) 编辑
leetcode 406. Queue Reconstruction by Height
摘要:Suppose you have a random list of people standing in a queue. Each person is described by a pair of integers (h, k), where h is the height of the pers 阅读全文
posted @ 2018-09-01 11:44 Beserious 阅读(148) 评论(0) 推荐(0) 编辑