Skip to content

About

A C program that takes a sequence of n integer values and removes duplicate occurrences.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Remove-Duplicates

A C program that takes a sequence of n integer values and removes duplicate occurrences.

This program...

  • Reads an input sequence of values, with each value giveing an ordered pair (value, position indicator)
  • Sorts the pairs in ascending order by value in a stable fashion. If the sort is stable, then the key is just the value. If the chosen sort is unstable, the key is extended with the position indicator.
  • Uses O(n) time to sort over the result and remove any occurences beyond the first one for a key.
  • Sorts the paris using the "unique" position indicator as the kye.
  • Outputs the number of unuque values followed by the values (without the position indicators).
  • Sorts the numbers utilizing qsort()

About

A C program that takes a sequence of n integer values and removes duplicate occurrences.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages