@@ -51,36 +51,36 @@ Select an option:
51
51
9 . Press 0 to exit
52
52
```
53
53
54
- **O/P:**
55
- Select an option: 1
56
- The sequence number of the newly created list is: n
57
- Enter key value to be inserted in the newly created list-n: *here user inputs integer m*
54
+ **O/P:**
55
+ Select an option: 1
56
+ The sequence number of the newly created list is: n
57
+ Enter key value to be inserted in the newly created list-n: *here user inputs integer m*
58
58
Program outputs `SUCCESS` or `FAILURE: MEMORY NOT AVAILABLE`.
59
59
60
- **Again Menu is displayed:**
61
- Select an option: 2
62
- List you want to insert in: *here user inputs list number n*
63
- Enter the key value: *here user inputs integer m*
64
- Program outputs `SUCCESS` or `FAILURE: MEMORY NOT AVAILABLE`.
60
+ **Again Menu is displayed:**
61
+ Select an option: 2
62
+ List you want to insert in: *here user inputs list number n*
63
+ Enter the key value: *here user inputs integer m*
64
+ Program outputs `SUCCESS` or `FAILURE: MEMORY NOT AVAILABLE`.
65
65
66
- **Again Menu is displayed:**
67
- Select an option: 3
68
- List you want to delete from: *here user inputs list number n*
69
- Enter the key value: *here user inputs integer m*
66
+ **Again Menu is displayed:**
67
+ Select an option: 3
68
+ List you want to delete from: *here user inputs list number n*
69
+ Enter the key value: *here user inputs integer m*
70
70
Program outputs `SUCCESS` or `FAILURE: ELEMENT NOT THERE / LIST EMPTY`.
71
71
72
- **Again Menu is displayed:**
73
- Select an option: 4
74
- Program outputs: Total number of nodes in all lists are M.
72
+ **Again Menu is displayed:**
73
+ Select an option: 4
74
+ Program outputs: Total number of nodes in all lists are M.
75
75
76
- **Again Menu is displayed:**
77
- Select an option: 5
78
- Enter the list number: *here user inputs list number n*
76
+ **Again Menu is displayed:**
77
+ Select an option: 5
78
+ Enter the list number: *here user inputs list number n*
79
79
Program outputs: Total number of nodes in list n are M.
80
80
81
- **Again Menu is displayed:**
82
- Select an option: 6
83
- Program outputs all the lists present in memory (or array in our case) in following format.
81
+ **Again Menu is displayed:**
82
+ Select an option: 6
83
+ Program outputs all the lists present in memory (or array in our case) in following format.
84
84
85
85
Elements of list-1 are:
86
86
@@ -98,18 +98,16 @@ Elements of list-2 are:
98
98
| 6 | 22 | 19 |
99
99
| 5 | NIL | 7 |
100
100
101
- **Again Menu is displayed:**
102
- Select an option: 7
103
- Program outputs all nodes of a free list in following format.
101
+ **Again Menu is displayed:**
102
+ Select an option: 7
103
+ Program outputs all nodes of a free list in following format.
104
104
105
- Elements of free list are:
105
+ Elements of free list are:
106
106
`[16, 1, 10]`
107
107
108
- **Again Menu is displayed:**
109
-
110
- Select an option: 8
111
-
112
- Here the program performs defragmentation and outputs SUCCESS / FAILURE.
108
+ **Again Menu is displayed:**
109
+ Select an option: 8
110
+ Here the program performs defragmentation and outputs SUCCESS / FAILURE.
113
111
114
112
**Note:** Defragmentation does not require all nodes of a particular list to be stored contiguously. Rather, all
115
113
allocated nodes of all the lists should be stored contiguously.
0 commit comments