Skip to Main Content
Data Structures Using C, 2nd Edition by Pearson
book

Data Structures Using C, 2nd Edition by Pearson

by A. K. Sharma
May 2024
Intermediate to advanced content levelIntermediate to advanced
521 pages
14h 12m
English
Pearson India
Content preview from Data Structures Using C, 2nd Edition by Pearson
Arrays: Searching and Sorting 109
else
{
back 5 Loc;
/* Shift elements one step left */
while (back < M)
{
List[back] 5 List [back + 1];
back++;
}
M5M − 1;
/* Display the final list */
printf (“\n The Final List is ......”);
for (i 5 0; i < M; i++)
{
printf (“%d “, List[i]);
}
}
}
It may be noted that arrays are not suitable data structures for problems requiring insertions and
deletions in a list. The reason is that we need to shift elements to right or to left for insertion and dele-
tion operations, respectively. The problem aggravates when the size of the list is very large as an equally
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Data Structures Using C

Data Structures Using C

Samir Kumar Bandyopadhyay, Kashi Nath Dey
Intermediate C Programming, 2nd Edition

Intermediate C Programming, 2nd Edition

Yung-Hsiang Lu, George K. Thiruvathukal

Publisher Resources

ISBN: 9781299831582