Exercise - Exercise - Indexed Tree

physical exercise Time limit: up to 40 use cases, 1.5 seconds (C/C + +), 2 seconds (Java) / memory limit: 256 MB (Stack 1 MB) A new kind of fitness equipment has been introduced into the gym that zhe min often goes to. The equipment is in the form of two columns erected. There are N+1 handles on each column, and each handle is pasted with numbe ...

Added by dietkinnie on Thu, 20 Jan 2022 19:26:57 +0200

Lecture 2 of Blue Bridge Cup -- recursive [exercise]

preface Blue Bridge Cup Official Website: Blue Bridge Cup - National College Students TMT industry competition ✨ This blog explains the algorithm knowledge involved in the Blue Bridge Cup C/C + + preparation. This blog is the second lecture: recursion [exercise] See blog for details of [example] of recursion: Lecture 2 of Blue Bridge Cup ...

Added by forcer on Thu, 20 Jan 2022 18:54:52 +0200

Select Sorting Algorithm

Select Sorting Algorithm In order to sort the sequences with less data in ascending or descending order, we can consider using the selective sorting algorithm, whose corresponding time complexity is O(n2). The idea of sorting the sequence containing n elements by sorting algorithm is to find the maximum or minimum value from the sequence to b ...

Added by nafetski on Thu, 20 Jan 2022 15:15:19 +0200

[sitch cup · blue bridge on cloud - algorithm training camp] week 2

Problem Description: 1 Band fraction 100 can be expressed as a fractional form: 100 = 3 + 69258 / 714. It can also be expressed as: 100 = 82 + 3546 / 197. Note: in the band fraction, the numbers 1 ~ 9 appear respectively and only once (excluding 0). Like this band fraction, 100 has 11 representations. Solution: #include<iostream> #inc ...

Added by subasi on Thu, 20 Jan 2022 15:12:08 +0200

Some views of HashSet based on bottom + characteristics

preface This article will not elaborate too much on the principle of HashSet, but only on some views of HashSet based on bottom + specific. I would like to point out some mistakes. Thank you HashSet features Element uniqueness: because HashSet is implemented based on HashMap, the elements in HashSet are stored on the key of HashMap, and the ...

Added by dvdflashbacks on Thu, 20 Jan 2022 07:54:50 +0200

Common sorting algorithms

Sorting algorithms are divided into internal sorting and external sorting. We often say that the sorting algorithm is internal sorting Internal sorting: data records are sorted in memory External sorting: the sorting data is too large to hold all sorting records at one time. External memory needs to be accessed in the sorting process Stable sor ...

Added by mryno on Thu, 20 Jan 2022 06:52:06 +0200

NOJ-Python programming assignment of Northwest University of technology 61-70

Northwest University of technology NOJ-Python programming problem set: Noj Python Programming: Season 1: season 1-easy (1-10) Noj Python Programming: Season 2: Season 2 snippet (11-20) Noj Python Programming: Season 3: season 3-loop (21-30) NOJ-Python programming: Season 4: enumeration algorithm (31-40) NOJ-Python programming: Season 5: modular ...

Added by teguh123 on Thu, 20 Jan 2022 06:33:07 +0200

Sword finger offer tree 2m Stack & queue 2e1m1h-10

JZ86 (m) finds the nearest common ancestor of two nodes in the binary tree Simple idea: first dfs, record the path, find the corresponding value, and then return; Then compare the two paths (arrays) obtained by dfs and find the last same value from scratch;Complexity: time O ...

Added by sturoy on Thu, 20 Jan 2022 05:45:08 +0200

Algorithm -- topological sorting

Topological sorting Undirected graph and directed graph directed graph can be divided into directed acyclic graph DAG and directed acyclic graph     Given a directed graph G containing n # nodes, we give an arrangement of its node numbers if: For any directed edge (u, v) in graph G , u , appears in front of v in the arrangement. Then the ...

Added by macastor on Thu, 20 Jan 2022 03:43:22 +0200

Li Kou brush question diary [January 19, 2022]

Li Kou brush question diary [January 19, 2022] 1. Sum of two numbers Given an integer array nums and an integer target value target, please find the two integers with and as the target value target in the array and return their array subscripts. You can assume that each input will correspond to only one answer. However, the same element in th ...

Added by webguync on Thu, 20 Jan 2022 03:10:22 +0200