Skip to content

Stock C++ code for the Language Library Design of C++ with Bjarne Stroustrup.

Notifications You must be signed in to change notification settings

saniaarif22/CPlusPlus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CPlusPlus

Stock C++ code for the Language Library Design of C++ with Bjarne Stroustrup.

The purpose of this assignment is to find N for which it is better to use a linked list than a vector (or an array) to represent the sequence.

Sorting program:

  • Program generates N random integers and inserts them into a sequence so that each is inserted in its proper position in the numerical order.

    For example 5 1 4 2 gives:

    5

    1 5

    1 4 5

    1 2 4 5

  • We then remove elements one at a time by picking a random position in the sequence and remove the element there.

    For example positions 1 2 0 0 gives:

    1 2 4 5

    1 4 5

    1 4

    4

  • The sequence grows incrementally.

About

Stock C++ code for the Language Library Design of C++ with Bjarne Stroustrup.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages