## [sword finger Offer] sort

Sword finger Offer 40. Minimum number of k Enter the integer array arr to find the minimum number of k. For example, if you enter 8 numbers: 4, 5, 1, 6, 2, 7, 3 and 8, the minimum 4 numbers are 1, 2, 3 and 4. Example 1: Input: arr = [3,2,1], k = 2 Output:[1,2] perhaps [2,1] Example 2: Input: arUTF-8...

Posted by geethalakshmi on Sat, 25 Sep 2021 07:55:20 +0530

## [graphic C language] quick sorting, really good and quick

Quick sort is an exchange sort method of binary tree structure proposed by Hoare in 1962. It is worth mentioning that bigwigs are still active in academia. Introduction to quick sort Let's first get a rough idea of quick sort: The basic idea is: take any element in the element sequence to be soUTF-8...

Posted by Ibnatu on Sat, 25 Sep 2021 23:16:16 +0530

## [data structure and algorithm] search

1, Basic introduction In java, there are four common Searches: 1) Sequential (linear) lookup 2) Binary search / half search 3) Interpolation lookup 4) Fibonacci search 2, Sequential (linear) lookup **Question: * * there is a sequence: {1,9,11, - 1,34,89}. Judge whether the sequence contains a vUTF-8...

Posted by Garrett on Sat, 25 Sep 2021 23:52:30 +0530

## Data structure knowledge points - stack and queue

Stack Definition: a linear table that can only be inserted and deleted at one end Logical structure: it is the same as linear table and still has a one-to-one relationship Storage structure: sequential stack or chain stack can be used for storage, but sequential stack is more common Operation rUTF-8...

Posted by jbruns on Sun, 26 Sep 2021 08:32:52 +0530

## [graphic C language] is just a simple sort

Today we will introduce several common sorting methods: Insert sort Direct insert sort The idea of direct insertion sorting is relatively simple. We divide the array into two parts: ordered area and unnecessary area. We continuously insert the first element of the disordered region into the ordUTF-8...

Posted by Akira on Sun, 26 Sep 2021 12:20:48 +0530

Introduction to linked list ·A linked list is an ordered list ·Linked lists are stored as nodes ·Each node contains the data field and the next field ·The nodes of the linked list are not necessarily stored continuously ·The linked list is divided into the linked list with the leading node and UTF-8...

Posted by Fantast on Sun, 26 Sep 2021 15:27:50 +0530

## Seven sorting algorithms (bubble sort, select sort, insert sort, heap sort, Hill sort, merge sort, quick sort)

Bubble sorting Bubble sorting is the simplest sorting algorithm, called bubble: in fact, it is really like a bubble emerging from the bottom of the water. As the position of the bubble gets closer and closer to the water surface, the bubble will get bigger and bigger. Bubble sorting is to compaUTF-8...

Posted by spivey on Mon, 27 Sep 2021 13:52:13 +0530

## Data structure -- time complexity and space complexity

1, Time complexity The number of basic operations in the algorithm is called the time complexity of the algorithm, which is expressed by T(n). T(n) = O(f(n)), that is, the increase of function time complexity tends to f(n) at most. Large "O" progressive representation (1) Replace all constant UTF-8...

Posted by koughman on Tue, 28 Sep 2021 06:44:38 +0530

## Data structure note 1 - linear table

The pictures in the notes are from the classroom PPT Learning, if there are mistakes, welcome to correct! 1, Properties of linear table 1. There is only one start node, and the start node has no forward node. 2. There is only one end node, and the end node has no successor node. 3. Other nodes UTF-8...

Posted by jamesm6162 on Wed, 29 Sep 2021 01:12:49 +0530

## Java data structures and algorithm prefix, suffix, and suffix expressions (inverse Polish expressions)

@TOP Prefix expression (Polish expression) Prefix expressions, also known as Polish, have operators that precede operands Examples show that the prefix expression corresponding to (3+4)*5-6 is-*3 4 5 6 General expression prefix expression: it is easy to write without details Start at the top, tUTF-8...

Posted by shanx24 on Wed, 29 Sep 2021 21:51:35 +0530