Standard template library for solving algorithm problems
Monotone stack handles the problem of size comparison in the overall O(n) time by maintaining the monotonic increment (decrement) of the value in the stack.
739 daily temperature
Given the daily temperature, it is required to wait a few days for each day to wait for a warmer day. If there is no warmer weather after that day, it is recorded as ...
Posted by r3dk1t on Thu, 21 Oct 2021 22:53:03 -0700
Sword finger offer day10-day13
Sword finger Offer 46. Translate numbers into strings
Title:
Given a number, we translate it into a string according to the following rules: 0 into "a", 1 into "b", 11 into "l", and 25 into "z". A number may have multiple translations. Please implement a function to calculate how many different translat ...
Posted by fred2k7 on Mon, 18 Oct 2021 11:26:55 -0700
⭐ Introduction to Algorithms ⭐ Binary Enumeration Simple 14 - LeetCode LCP 28. Purchasing Scheme
1. Title
1. Title Description
_Xiaoli will
n
n
Quotations for n parts are stored in an array
n
u
m
s
...
Posted by hakmir on Mon, 18 Oct 2021 09:01:36 -0700
5888. When the network is idle
5888. When the network is idle
Give you one with n Computer network of servers with server number 0 reach n - 1 . And give you a two-dimensional array of integers edges , among edges[i] = [ui, vi] Represents the server UI and vi There is an information line bet ...
Posted by justinwhite93 on Sun, 17 Oct 2021 18:12:37 -0700
2021-10-14 Swordfinger offer 2:37~48 Topics + Thoughts + Multiple Solutions
Write before
This article uses python as the programming language and the author practices it by himself. The list of topics is: Swordfinger Offer (2nd Edition) ""Swordfinger Offer (2nd Edition)"passes through the world's classic secrets for programmer interviews. Analyse typical programming interviews, collate the basic kno ...
Posted by Journey44 on Sun, 17 Oct 2021 09:42:20 -0700
Leetcode 785. Judgment bipartite graph (medium)
subject
There is an undirected graph with n nodes. Each of these nodes has a unique number between 0 and n - 1. Give you a two-dimensional array graph, where graph[u] is an array of nodes, which is composed of adjacent nodes of node U. Formally, for each V in graph[u], there is an undirected edge between node u and node v. The undirected graph ...
Posted by proxydude on Fri, 15 Oct 2021 20:10:23 -0700
leetcode [linked list - simple] 203. Remove linked list elements
preface
Hello, I'm long Lu. I'm just a junior now. I'm working on the back end and occasionally on the front end. Now the main language is Java. For a long time before, I was learning some technologies of web development. I haven't studied and brushed questions like data structures and algorithms for a long time. I plan to pick them up and ...
Posted by gplaurin on Fri, 15 Oct 2021 10:14:34 -0700
Binary Sum, Detailed Analysis + Two Ideas + Summary of Knowledge Points
Binary Sum
🔥🔥A special column was opened to record LeedCode topics, summarize ideas, analyze topics, summarize knowledge points, practice makes perfect! Welcome to collection!
1. Title
Give you two binary strings and return their sum (in binary).
The input is a non-empty string and contains only the numbers 1 and 0.
Example 1:
in ...
Posted by awais_ciit on Thu, 14 Oct 2021 10:28:57 -0700
leetcode 638. Shopping Offers | 638. Big gift bag (dynamic programming, multi constraint knapsack problem)
subject
https://leetcode.com/problems/shopping-offers/
Problem solution
Similar topics include: leetcode 474. Ones and Zeroes | 474. One and zero (double constrained knapsack problem)
This problem is essentially a knapsack problem with multiple constraints (n < 6). The goal is to minimize the total price when the knapsack is just full. ...
Posted by trink on Tue, 12 Oct 2021 15:33:31 -0700
[Algorithm-LeetCode] 110.Balanced Binary Tree (Recursive)
110.Balanced Binary Tree-Force Button (LeetCode)
Release: October 10, 2021 21:30:53
Problem description and examples
Given a binary tree, determine whether it is a highly balanced binary tree. In this topic, a height-balanced binary tree is defined as: The absolute difference between the left and right subtrees of each node of a binary tr ...
Posted by lox on Sun, 10 Oct 2021 10:19:23 -0700