# Sorting Algorithm experience game

Source: Internet
Author: User

There was some confusion during invigilation and exclusive seats today.

I asked them to sit in order for N people in each column. If the student ID is continuous, columns 1 to n, 1st, and columns n + 1 to 2N, 2nd, this is a good example. The student ID is not consecutive and the student ID is disconnected. The rule is simple. If the number 2 and number 3 are vacant, the number 4 needs to sit directly behind the number 1.

Because there is no list at hand, this is really difficult for each student. On the 35 th, you must see the 31 nearest neighbor before you can determine your position. This is a task that must be completed in sequence. At that time, the students waited for each other and collapsed into a pile behind the classroom, so no one could move. Finally, my class cadres and I used the call method one by one to schedule the seats.

After my decision, I expressed my dissatisfaction with my classmates. To solve this problem, students with a student ID should immediately find their position. Students with a student ID can immediately exchange student ID information with each other and determine who is before or after the student ID. In addition to professional knowledge, other qualities must be improved in university studies. This incident reflects the lack of understanding of the entire group or the rules, or the mutual view and mutual dependency between the groups in the context of common needs (early sit up, you can get up early. In this case, executive power and leadership can be reflected and immediately take the initiative to take actions, rather than waiting for someone to give a question and cultivate such a quality.

My classmates and I said that if this is a job fair and a rule is given, the person who can grasp and act in time will take the lead. If this is a scenario at work and competitors stand out, the results are clear. Take immediate action. As a very important habit, we must cultivate ourselves and cultivate everything.

The exam started, and the students started to answer questions. The boring invigilator, however, is confused about all sorts of things.

I thought that the last thing was a sorting problem. Sorting is a basic problem in computer science. It can be seen everywhere whether it is a problem solved by computer or a problem in daily life. These students are learning data structures and algorithms this semester. They can use the learned algorithms for guidance.

In the program design course, I encourage students to write numbers on cards and compare, move, and experience sorting algorithms by algorithm flow. The simplest way is to use playing cards directly. A college student from Sapientia University in Hungary organizes six sort algorithms into a dance. It is very fun (click "Link" to see the bubble sort dance show ). I used to play a poker sort video with my son.

Traditional algorithms use a single control flow. In programming, algorithms, and data structures, you only focus on single-control flow algorithms.

Today's scenario can be organized into a multi-Control sort game. In addition, the parallel sorting of multi-processor or multi-agent coordination is acceptable.

Game Rules: Create n cards, print random numbers, and randomly send them to N game participants in a row. Adjacent players can view each other and compare the size of the cards. If necessary, they can exchange positions, finally, sort the order of numbers in the handheld card. The basic operation is to compare and switch the location. It is done by multiple people at the same time. Here, each person is a processor and an agent. To make the game more interesting, two or more groups of people will do this at the same time, and the fastest winner will win. To play in the classroom, a simple Reward and Punishment means should be used by the winners to blow their noses.

These people can also sit in the same column of seats in the classroom. the people sitting in the room don't move, and the adjacent people exchange cards. The same principle.

Before this game, you don't have to talk about the idea of parallel algorithms. You can repeat it several times and students can learn effective strategies.

In addition to the sorting algorithm, this game also features team spirit and cooperation capabilities-each "processor" needs to work hard to complete as soon as possible. Any individual's hesitation and waiting, is not conducive to the team's ultimate goal. I have to say that the current college students all want to be autonomous, but everything is waiting for a unified command. Without the equivalent investment in the team, their autonomous ability cannot be improved.

This game can be used in the classroom or in extra-curricular team expansion training in the future. Students trained using this game don't have to work hard to arrange seats, and they will do different things.

The idle invigilation brings great ideas.

 ============================ Author he Lijian csdn blog column ==================== ====|=== category directories of it student growth guidance column columns (occasionally updated) ==||== C ++ online class column he Lijian Course Teaching Link (by course grade) ==|||== my book-"attacking the university against the normal energy passed to it students" ==|==== paving the runway for it cainiao to take off, A university that enjoys happiness and passion with its students ====

Related Keywords:

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

## A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

• #### Sales Support

1 on 1 presale consultation

• #### After-Sales Support

24/7 Technical Support 6 Free Tickets per Quarter Faster Response

• Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.