answersLogoWhite

0

Insert in a sorted list

Updated: 12/20/2022
User Avatar

Suresh29

Lvl 1
16y ago

Best Answer

Means to put a new item in the proper place in a sorted list.

User Avatar

Wiki User

16y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Insert in a sorted list
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What advantages of a sorted list over a linked list?

All lists are linked lists; there is no such thing as a separate "sorted list". There are algorithms that can sort a list, of course, but they all work on linked lists.


What is an ordered list of data structure using c plus plus?

An ordered list of data in any programming language is simply a sorted array or list. In C++ this can either mean a sorted array, vector, list or forward list.


Write an algorithm to insert an item to a given location in sorted array?

To insert a number N into array A at index I: // Resize A if necessary If A is too small to add a new element then resize A // Right-shift all elements starting from position I For i = A.length to I A[i] = A[i - 1] // Insert new item A[I] = N


A merge algorithm which will merge two sorted lists into one sorted list?

You have two options here.For the first you have to ask yourself, "Is my data continuously sorted by the list itself?" If you answered 'yes' then you can simply add all data from one list to the other and the combined list will be sorted.If you answered 'no' to the above question, then it means you have two lists which are currently sorted, but which may not remain that way if new elements are added to them.Let's look at some steps to merge all elements list1 and list2 into a separate list3. (We'll assume data is sorted from least to greatest).1) Start two index counters (one for each list) which point to the start of the list.2) Is the element at list1[index1] less than the element at list2[index2]?If so, add list1[index1] to the end of list3 and increment index1.If not, add list2[index2] to the end of list3 and increment index2.3) If either index has reached the end of its list, then add the remaining elements from the other list to list3 and we're done.4) Otherwise, go back to step 2.


Program for inserting a new node in between two list in c?

To insert a new node between two lists, append the new node to the first list, then insert the head node of the second list after the new node.

Related questions

What command sends a list of files in the working directory to the printer sorted by size?

control+x+insert


If a list of words is sorted alphabetically in word then it is in blank order?

It will be sorted in ascending order.


What advantages of a sorted list over a linked list?

All lists are linked lists; there is no such thing as a separate "sorted list". There are algorithms that can sort a list, of course, but they all work on linked lists.


What is an ordered list of data structure using c plus plus?

An ordered list of data in any programming language is simply a sorted array or list. In C++ this can either mean a sorted array, vector, list or forward list.


When google returns a list of websites how is the list sorted?

When Google returns a list of websites the list is sorted by which sites best match your criteria. What you enter into the search box determines what comes back on the list. At the top of the list you will find items that are most closely related to your search words.


What is ordering in DBMS?

changing of unsorted list to sorted list in a ordering from alphabets, numbers, ASC/DESC.


What is the median score math?

In a sorted list of number, the median score in math is the number in the middle of the list.


What is the median of 49 1 9 4 36 25 16?

The median is the middle of the list (when sorted). In this case 16. The sorted list is:1, 4, 9, 16, 25, 36, 49.


Where can you find a list of Bakugan sorted by their G-power?

It comes with some bakugan packets.


Assuming an emty list what operations are used to delete and insert a data?

Delete is not possible for an empty list, insert is something like this: Create a new list-element. Register it as the first element of the list. Register it as the last element of the list.


Is there a program that you can insert a list of terms and it will define them?

No.


What is cprogram code to insert a node in single link list?

Write Code to Insert a Node in a Single Linked List at any given Position.