Data structure and algorithm-4. Matrix zeroing
4. Matrix zeroing
subject
Given a matrix of m x n, if an element is 0, all elements in its row and column are set to 0. Please use the in place algorithm. Advanced: An intuitive solution is to use the extra space of O (m, n), but this is not a good solution. A simple improvement is to use the additional space of O(m + n), but this is sti ...
Posted by starter911 on Tue, 26 Oct 2021 06:21:13 +0200
Red black tree, insert and delete, based on C + +
Continued Red black tree, insertion and deletion, better understanding , in this article, I won't introduce the understanding part too much, because what I said in the last article is almost the same. Next, I will implement the red black tree based on C + +. Similarly, you are welcome to ask questions ...
Posted by akx on Mon, 25 Oct 2021 04:56:29 +0200
The last time I saw such a good ranking blog was last time
This paper will take you to understand the common sorting algorithms in the form of speaking + moving graph, briefly analyze the complexity, stability and other indicators, and give the reference code. Finally, the use of Amway sort() function.
Select sort
The smallest element after each selection is placed in front.
Time complexity ...
Posted by knobby2k on Sun, 24 Oct 2021 17:29:01 +0200
[data structure] learn seven ranking algorithms and principles based on comparison in one breath - illustrated with text [detailed explanation 7]
Overview of learning contents in this section
Sorting concept
Sorting is the operation of arranging a string of records incrementally or decrementally according to the size of one or some keywords.In the usual context, if sorting is mentioned, it usually refers to ascending order (non descending order).Sorting in the usual sense refer ...
Posted by andyjimmy on Sun, 24 Oct 2021 16:51:46 +0200
Experiment Name: basic operation of sequence table
1, Purpose of the experiment:
1. Review the knowledge of C language programming.
2. Master the representation and implementation of sequential storage structure of linear table.
3. Master the algorithm implementation of the basic operation of the sequence table.
2, Experiment content:
1. Establish a sequence table.
2. Insert, delete and ...
Posted by nubby on Sun, 24 Oct 2021 13:50:32 +0200
[Data Structure and Algorithms] Extra-multiple diagrams, extra-detailed, heap-detailed
🎈 Author: Linux Ape
🎈 Introduction: CSDN Blog Expert 🏆, Huawei Yunheen Expert 🏆, Linux, C/C++, interviews, refreshes, algorithms although consulting me, follow me, have questions and chat privately!
🎈 Focus column: Illustrating data structures and algorithms (The quality of good writing is continuously updated...) 🚀
🎈 Wel ...
Posted by adambedford on Sun, 24 Oct 2021 03:28:16 +0200
Go deep into the bottom! Iterative traversal and traversal of binary tree
① Traversal mode and concept of binary tree
Preorder traversal: traverse according to the head left right method, first output the head, then output the left, and finally output the right.
According to the above figure, the preceding traversal should ...
Posted by possiblyB9 on Sat, 23 Oct 2021 16:56:42 +0200
Data structure and algorithm-1. Longest palindrome substring
1. Longest palindrome substring
subject
Give you a string s and find the longest palindrome substring in S.
Example 1: Enter: s = "bad" Output: "bab" Explanation: "aba" is also the answer to the question. Example 2: Input: s = "cbbd" Output: "bb" Example 3: Input: s = "a" Outpu ...
Posted by fierdor on Sat, 23 Oct 2021 13:43:35 +0200
2021 Liaoning college student programming competition C D E F G I L
WAWA cried, Weak chicken picking silver for retirement
Thank you for your great help from your teammates, master Fang and brother Qi 👍
CInfectious disease statisticshttps://ac.nowcoder.com/acm/contest/22352/C
Title Description
A Qiang came to the street. There were N people on the street, numbered 1 ∼ N. For simplicity, we see ...
Posted by darkcarnival on Sat, 23 Oct 2021 12:19:58 +0200
Eight sorting algorithms of ten thousand word summary drawing solution
1. Concept and application of sorting
Sort:
Sorting is the operation of arranging a series of records according to the small, increasing or decreasing of one or some keywords.
Stability:
It is assumed that there are multiple records with the same keyword in the record sequence to be sorted. If they are sorted, the relative orde ...
Posted by The MA on Sat, 23 Oct 2021 07:25:47 +0200