Day13. Sliding window maximum value, top K high frequency elements

Day13. Sliding window maximum value, top K high frequency elements 0239. Sliding window maximum Link: 0239. Sliding window maximum Monotonic queue: The queue is monotonic. In order to maintain this monotonicity, when adding elements to the tail of the queue, if the previous element and the current element do not satisfy the monotonic relatio ...

Posted by papacostas on Thu, 10 Nov 2022 19:11:56 +0300

antv X6 Cell parent-child node problem

sParentOf(...) isParentOf(child: Cell | null): boolean Returns whether the current node is the parent node of the specified Cell. parameter nametypeMandatory Default valuedescribechildCell | null✓ isChildOf(...) isChildOf(parent: Cell | null): boolean Returns whether the current node / edge is a child node / edge of the specified node. p ...

Posted by 2tonejoe on Wed, 25 May 2022 05:35:03 +0300

[data structure and algorithm] stack and queue

Stack What is a stack? Stack is a kind of linear table. It only allows the insertion and deletion of elements at the fixed end. The one end for data insertion and deletion is called the top of the stack and the other end is called the bottom of the stack. Therefore, the stack addition and deletion elements have what we often call last ...

Posted by beboo002 on Fri, 20 May 2022 00:43:56 +0300

[Leetcode]928. Minimize Malware Spread II

Title address: https://leetcode.com/problems/minimize-malware-spread-ii/ Given a n n An undirected graph with n nodes is given by adjacency matrix. Each node represents a node in a network. Give another array A ...

Posted by msarefin on Tue, 26 Apr 2022 09:58:44 +0300

Leetcode-480 Sliding window median

Sliding window median The median is the number in the middle of the ordered sequence. If the length of the sequence is even, there is no middle number; At this time, the median is the average of the two numbers in the middle. For example: [2,3,4], the median is 3[2,3], the median is (2 + 3) / 2 = 2.5 Give you an array nums, with a window of ...

Posted by ready2drum on Sun, 17 Apr 2022 12:46:56 +0300

Sword finger offer: 12 Path in matrix

12 - path in center Source: LeetCode Link: https://leetcode-cn.com/problems/ju-zhen-zhong-de-lu-jing-lcof/ Given an m x n two-dimensional character grid board and a string word word. If word exists in the grid, return true; Otherwise, false is returned. Words must be formed alphabetically by letters in adjacent cells, where "adjacent&q ...

Posted by cr55dan on Sun, 10 Apr 2022 15:49:55 +0300