Lecture
Remove from the list the element that follows the element with the working pointer p.
To do this, you must perform the following steps:
a) Enter the pointer q, which will point to the element to be deleted.
q = ptr (p)
b) Put behind item A item B
ptr (p) = ptr (q)
c) Remember the information contained in the info field of the item to be deleted.
k = info (q)
d) Delete the item with the q pointer.
Freenode (q)
Finally:
Options:
1) It is given the ring list containing 20 surnames of players of a football team. Split players into 2 groups of 10 people. In the second group falls every 12th person.
2) There are 2 ring lists containing the names of the athletes of 2 fencing teams. Make a draw. In the first team, every n-th player is selected, and in the second - every m-th player.
3) The task of Josephus.
4) There are 2 ring lists containing the names of the lottery participants and the names of the prizes. Win N people (every K-th). The number to recalculate prizes is t.
5) There are 2 lists containing the names of the students and the number of examination tickets. The number of recalculations for tickets - E, for students - K. Determine the numbers of tickets pulled out by students.
6) Given a list containing the list of goods. From the elements of the 1st list (products manufactured by SONY) create a new list.
7) Given 2 lists containing the names of the students of 2 groups. Transfer L students from the 1st group to the second. Conversion number -K.
8) Given 2 lists containing the list of goods produced by Concern BOSH and FILIPS. Create a list of products produced both by one and another company.
9) There are 2 lists containing the names of the players of the main team and the reserve. Make K replacements.
10) There are 2 lists containing the names of the soldiers of the 1st and 2nd platoons. During the attack of M, the man from the 1st platoon died. To replenish the soldiers of the 2nd platoon.
11) Given 2 lists containing the list of products and the names of buyers. Every Nth buyer buys Mth product. Display a shopping list.
12) There are 2 lists containing the names of products manufactured by SONY and SHARP. Create a list of products competing with each other products.
Comments
To leave a comment
Structures and data processing algorithms.
Terms: Structures and data processing algorithms.