Leetcode 2034. Stock price fluctuation__ Dual set storage
2034. Stock price fluctuation
Give you a data stream of stock prices. Each record in the data stream contains a time stamp and the price corresponding to the stock at that time point.
Unfortunately, due to the inherent volatility of the stock market, stock price records may not come in chronological order. In some cases, some records may be w ...
Posted by T_Hayden on Mon, 24 Jan 2022 08:23:46 +0100
Prepare for the second test, three questions a day, Day17
Prepare for the second test, three questions a day
Topic 1: minimum insertion times of balanced bracket string
Give you a parenthesized string s, which contains only the characters' ('and'). A parenthesized string is called balanced when it satisfies:
Any left parenthesis' ('must correspond to two consecutive right parentheses'). The left pa ...
Posted by Victorm on Mon, 24 Jan 2022 07:14:16 +0100
Leetcode 2140. Solving intellectual problems
Title Link
Game 276 week 3 https://leetcode-cn.com/problems/solving-questions-with-brainpower/
Topic content
Give you a two-dimensional integer array questions with subscript starting from 0, where questions[i] = [pointsi, brainpoweri].
This array represents a series of questions in an exam. You need to solve them in order (that is, startin ...
Posted by joozt on Mon, 24 Jan 2022 06:52:06 +0100
leetcode force buckle - Sword finger offer brush question - day3-004 A number that appears only once
Sword finger Offer II 004 Number that appears only once - LeetCode (LeetCode CN. Com)https://leetcode-cn.com/problems/WGki4K/
You want to use brute force cracking through array traversal directly, but in the use case [43,16,45,89,45, - 2147483648,452147483646, - 2147483647, - 2147483648,432147483647, - 2147483646, - 2147483648,89, - 2147483 ...
Posted by BryonS on Mon, 24 Jan 2022 03:44:53 +0100
Analyze LinkedList from the design source code
I'm so tired to write this blog. In addition, it took me 6 hours to write and read the source code. It can be said that I was extremely lucky and bitter. Too tired, too tired!!! Linked list is a linear list with linked storage. The memory addresses of all elements are not necessarily continuous.
Dynamic array has an obvious disadvantage ------ ...
Posted by hjunw on Mon, 24 Jan 2022 03:11:53 +0100
[case of algorithm thousand questions] practice LeetCode punch in once a day - 103 Intimate string
๐ข preface
๐ Algorithm problem ๐
๐ฒ Punching out an algorithm problem every day is both a learning process and a sharing process ๐๐ฒ Tip: the problem-solving programming languages in this column are C# and Java๐ฒ To maintain a state of learning every day, let's work together to become the great God of algorithm ๐ง!๐ฒ Tod ...
Posted by bolerophone on Mon, 24 Jan 2022 00:55:10 +0100
Analysis of the real problem of the 9th Blue Bridge Cup group A (2018) provincial competition
Analysis of the real problem of the 9th Blue Bridge Cup group A (2018) provincial competition
1. Score
1/1+1/2+1/4+1/8+1/16+...Each item is half of the previous item. If there are 20 items in total, how much is the sumThe results are expressed in fractions, similar to:3 / 2. Of course, the first two items are added. The numerator and denomina ...
Posted by michaelphipps on Mon, 24 Jan 2022 00:33:18 +0100
LeetCode Hot100 -- string topic
128. Longest continuous sequence
Given an unordered integer array nums, find out the length of the longest sequence of consecutive numbers (not ascending but continuous) (sequence elements are not required to be continuous in the original array).
Idea:
class Solution:
def longestConsecutive(self, nums):
if not nums:
...
Posted by EPCtech on Mon, 24 Jan 2022 00:06:51 +0100
Code Capriccio brush questions - string
This article is a note taken when writing questions with the code Capriccio every day, which is used to summarize and review.
catalogue
344. Reverse string
541. Reverse string II
Sword finger offer 05 Replace spaces
151. Reverse the words in the string
Sword finger offer 58 - โ
ก Left rotation string
28. Implement str ()
459. Duplicate ...
Posted by nads1982 on Sun, 23 Jan 2022 23:47:10 +0100
LRU algorithm and LFU algorithm
LRU algorithm
LRU is the abbreviation of Least Recently Used, that is, the Least Recently Used algorithm. It is a page replacement algorithm in the operating system. Because the number of pages stored in memory is limited, the recently unused algorithm will be moved out of memory. LRU principle: The principle of LRU is shown in the figure belo ...
Posted by Kyori on Sun, 23 Jan 2022 17:26:43 +0100