Insert sorting algorithm summary -- with JAVA language implementation

Before introducing the algorithm, I will first introduce you to a very useful website. The visualization process inside can help you better understand the data structure and algorithm VISUALGO.NET: https://visualgo.net/zh. Visualization process: The following contents are explained in three aspects: the idea, characteristics and implemen ...

Posted by technotool on Sun, 23 Jan 2022 05:45:24 +0100

(2022.1.19) training: 2021 ICPC Shanghai railway station

Overall summary This time, it's still in a hurry. One important reason is to prepare for the final exam. I haven't been in touch with the game for a long time. On the whole, we should be familiar with the process and skills of doing questions as soon as possible. Of course, it is more important to improve our ability. Topic D The descrip ...

Posted by adavis on Sun, 23 Jan 2022 05:34:35 +0100

python algorithm template part I (quick sort, merge sort, integer bisection, real bisection)

Note: This article is after learning acwing Basic algorithm Course It is mainly used to record the template of python version algorithm. 1. Quick sort Thought: Divide the list with a number (pivot) in the list. The number on the left is less than pivot and the number on the right is greater than pivot. Steps: 1. Determine pivot. Left, right, ...

Posted by TheKiller on Sun, 23 Jan 2022 01:58:25 +0100

Logu p1518[USACO2.4] Two Tamworth Two

Title Description Two cattle escaped into the forest. Farmer John began chasing the two cattle with his expertise. Your task is to simulate their behavior (Bull and John). Follow at 10\times 1010 × 10. In a flat grid. A grid can be an obstacle, two cows (they're all together), or Farmer John. Both cows and Farmer John can be in the same ...

Posted by Derokorian on Sat, 22 Jan 2022 23:46:31 +0100

Thoroughly understand Kruskal algorithm (with C + + code implementation)

I problem The six vertices in the figure represent six villages respectively, and the weight of the line segment represents the distance between villages. How can I find the shortest way to visit each village, and each village can only be visited once. II solve 1. Extract the edges of the graph, arrange the edges from small to large accord ...

Posted by Porl123 on Sat, 22 Jan 2022 22:09:12 +0100

NOJ-Python programming assignment of Northwest University of technology 91-100

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 ...

Posted by luke_barnes on Sat, 22 Jan 2022 21:44:30 +0100

Leetcode Brush Title Notes - Basic Operation and Classic Title of Chain List

Brush the title from: Code Casual Recording 1. Chain list basic operations 707. Design Chain List Leetcode Link Design the implementation of the chain table. You can choose to use single or double-linked lists. A node in a single-chain table should have two attributes: val and next. val is the value of the current node, and next is the ...

Posted by qrt123 on Sat, 22 Jan 2022 21:35:16 +0100

C language data structure - queue

1, Basic concepts of queue (1) Definition: a linear table that can only be inserted at one end of the table and deleted at the other end of the table. (2) Features: first in first out The schematic diagram is as follows: 2, Queue of sequential storage structure Dynamic diagram of sequential queue with 6 storage spaces 2.1 "false ove ...

Posted by mistercoffee on Sat, 22 Jan 2022 21:14:58 +0100

Double non guys gain Tencent WXG offer in summer internship, which is not more popular than Bo people?

preface It's also an interview experience shared by a fan During the summer internship of his junior year, he went ashore with Tencent through three technical aspects and one hr. The questions asked by the interviewer are also quite representative. They compare the test principles and thinking logic, and sort them out for everyone to see ...

Posted by porta325 on Sat, 22 Jan 2022 18:54:40 +0100

How to Eliminate Recursive Summary with Stack

Reference article: How to replace recursive functions using stack and while-loop to avoid the stack-overflow. Links: How to replace recursive functions using stack and while-loop to avoid the stack-overflow - CodeProject The paper is a foreign literature in full English. Describes some methods of eliminating recursion with stack, after readin ...

Posted by luckybob on Sat, 22 Jan 2022 18:10:55 +0100