Data structure -- logical thinking and code analysis of double linked list

1, Double linked list There is only one pointer to its successor in the single linked list node, so that the single linked list can only traverse backward from the first node in turn. To access the predecessor node of a node (during insertion and deletion operations), you can only traverse from the beginning. The time complexity of access ...

Posted by gottes_tod on Sat, 11 Sep 2021 23:14:56 +0200

python implementation of Huffman tree and tree structure visualization

Preface The principle of the Huffman tree and its python implementation: Q's knowledge blind spot in the recent interview, only remember the noun does not know its meaning. After three years of work, what you learned during the entrance examination for postgraduate studies is basically returned to the teacher. In addition to the list wor ...

Posted by D3xt3r on Sat, 11 Sep 2021 18:27:02 +0200

2021-9-7 299. Number guessing game (Hash Table + secondary traversal, bucket + primary traversal)

Note: Title: You are playing balls and cows with your friends. The rules of the game are as follows: You write a secret number and ask your friend to guess what the number is. Every time a friend guesses, you will give him a hint to tell him how many digits in the guessed number belong to the number and the exact position are guessed correctl ...

Posted by dzm on Fri, 10 Sep 2021 11:17:57 +0200

kuangbin topic 1. Search (low order)

A - chessboard problem https://vjudge.ppsucxtt.cn/contest/65959#problem/A Idea: whether dfs searches for different rows and columns, the main steps are the marking and release order of vis array. #include <iostream> #include <stdio.h> #define MAX 0x3f3f3f3f using namespace std; typedef long long ll; const int maxn = 10; int n, k, ...

Posted by Ashley Sheridan on Fri, 10 Sep 2021 03:04:21 +0200

Select sort - simple select sort

Return to directory basic thought Select the minimum value from arr[0]~arr[n-1] for the first time, Exchange with arr[0], select the minimum value from arr[1]~arr[n-1] for the second time, exchange with arr[1], select the minimum value from arr[2]~arr[n-1] for the third time, and exchange with arr[2] Exchange,..., select the minimum value ...

Posted by numerical25 on Thu, 09 Sep 2021 21:29:25 +0200

Data structure and algorithm Chapter 1

preface: The blogger has opened a new column "data structure and algorithm". I hope you guys can give more support. Thank you very much! The blogger is currently in the initial stage of data structure. If there are any mistakes in the blog, I hope you guys will give us your advice. Thank you very much! Just like everything ...

Posted by shortj75 on Thu, 09 Sep 2021 01:34:46 +0200

(data structure) realize the sequence table in C + + environment and a beginner's understanding of the sequence table

The abstract data type of linear table is defined in the sequential table storage structure and implemented by C + + class. Its template mechanism is as follows. const int MaxSize = 100; template <typename DataType> class SeqList { public: SeqList( ); //Create an empty sequence table SeqList(DataType a[ ], int ...

Posted by ComputerNerd888 on Wed, 08 Sep 2021 23:21:22 +0200

Read the big talk data structure carefully and win 45 points EP3 with you

We have learned the sequence table before. The sequence table refers to the arrangement one by one in the physical memory, and the addresses of each element in the sequence table are closely connected. This kind of table deletion and insertion is very troublesome because we have to move all elements back. The worst time complexity is O(n). When ...

Posted by mjlogan on Wed, 08 Sep 2021 03:43:51 +0200

C language - string sequential storage representation and basic operation implementation

Three storage representations of 1 string      String, i.e. string. It should be noted that there is no string data type in C language, but it is implemented as a data structure - "content limited linear table", and the concepts of empty string, blank string, string length, substring and main string are agreed [se ...

Posted by eatadi on Tue, 07 Sep 2021 05:01:29 +0200

Some understanding of pandas

Introduction to pandas numpy can help us with numeric data, but that's not enough. Many times, our data includes not only numeric values, but also strings, time series, and so on. That's where we need pandas to help us with them. What is Pandas? The Pandas name comes from panel data Pandas is a powerful toolset for analyzing structured data, b ...

Posted by taldos on Sun, 05 Sep 2021 19:10:57 +0200