السلام عليكــم ورحمـة الله وبركاتــه ،،كيف حالك إن شاء الله دائمــاً بخير
أهلاً ومرحباً .. إلى كوكبة أعضائنـا الكرام ،،
ممكن تساعدوني عندي اسايمنت لمادة داتا ستركتشرمادة صعبة بشكل وماني عارفة كيف احلة بلييييييييييييييييييييييييييييييييييييز دلوني عالحل
:wacko:
Following diagram shows the problem of Tower of Hanoi. The problem says that There are 3 towers A, B & C. Tower A has three blocks 1, 2 & 3 of different sizes. The task is to place these blocks in tower C in the same order as they are placed in A. You can take use tower B for finding the solution.
Following are the conditions:
Move one block at a time.
At any point of time a large block should not rest over a small block
Make use of minimum number of moves while giving the solution.
Suggest a suitable data structure that could be used to solve the above problem and write down the program in C++ for solving the above p
roblem
Task 2: Given a structure definition: struct employee{ int emp_id; float emp_salary; struct employee * llink; struct employee * rlink; }
a. Create a doubly linked list by adding nodes using dynamic memory allocation. Structure of each node in the linked list is given above, make this linked list as circular and display the elements of the linked list.
b. Write a program/algorithm to a sort linked list created in 2 a. :blink:
