Introduction to Data Structures and Algorithms

Description

Write a program that works with client files. Request ADT, input from files, and output files. Our goal in this project is to build an Integer List ADT in C and use it to indirectly alphabetize the lines in afile. This ADT module will also be used (with some modifications) in future programming assignments, so youshould test it thoroughly, even though not all of its features will be used here. Begin by reading the handoutADT.pdf posted on the class webpage for a thorough explanation of the programming practices and conventionsrequired for implementing ADTs in C in this class.

Don't use plagiarized sources. Get Your Custom Assignment on
Introduction to Data Structures and Algorithms
From as Little as $13/Page

Unformatted Attachment Preview

one
two
three
four
five
six
seven
eight
nine
ten
eleven
twelve
Macrochires
stylopodium
dawn
ignoration
scrutinization
parviflorous
anemopathy
evocatory
inmate
rectricial
nonrelativity
Sango
quasi-realistic
Pan-Arabic
Hebrew
base-ball
antineutrons
stockwork
BSRT
Criders
Collbaith
legitim
rouged
nonbody
Selene
overmarch
vivificated
mesosomatic
multiview
athletism
amalgamation
gramineous
payably
cacodylate
lintiest
l-arterenol
Protobasidii
hyaloliparite
life-enriching
dollship
theorically
impressionable
screek
metal-sheathed
pellucidly
simianity
Germanton
Poiana
pre-emptor
transferrotype
Kiel
siccar
high-flavored
re-enjoy
interluency
wonton
skier
foreseat
Gymnasium
Min
catty-corner
perron
medics
Otariidae
Linanthus
florins
deafly
premodeled
spoons
horol.
Nierstein
gunreach
bonzer
imbitters
Gaige
syntactially
BUR
thoracicoacromial
primed
correctable
anticipatorily
AFB
sassandra
boanerges
accidentarily
statesboy
dosimetries
Keos
Sara
preponderate
red-swelling
wedgebill
overhoping
hallucinated
aminoazo
water-living
unsparred
regamble
overprint
Logi
swaths
hotch
triticism
Slavo-lithuanian
oxyluminescence
Keelung
therologist
unnitrogenous
bolting
orthoplasy
papalise
Viipuri
interdebating
ingratitudes
unbedecked
uninnocent
luffer
chondroitin
rust-cankered
Douglasville
mealymouthedness
nuts
subventitious
interpubic
amuyong
heart-hardened
saints
dissociality
benumbment
camillus
Lach
anthraquinol
Moche
nonprocedural
eucalyptic
precardiac
redespise
phytoecological
unpalled
sepulchres
Burrton
oil-laden
Bogalusa
bronchiloquy
Haughton
bementite
Anglo-afghan
beglerbegship
winches
antonomasia
presubscriber
Hazelcrest
Denn
dilling
Flindersia
equisetic
groundsman
brattishing
dysanagnosia
bastioned
reprimandingly
rose-hued
fogbows
aims
saloop
acidific
movie
unfrilled
Christ-borne
prosopographical
euphroes
oligacanthous
balneation
archgod
intraspecies
unsignificant
anti-Roman
pseudofluctuation
Chetnik
sauropsidan
Loxiinae
blowy
pyknoses
Morrison
apologete
ovoplasmic
vaporoseness
outflanks
turnmeter
acetabular
frumpish
adelantados
Tarnopol
matchboxes
pupfishes
reconfined
worldly-mindedness
major-leaguer
streamingly
consultants
Agricola
Robinsonville
sol
self-immurement
goose-quill
essayish
Polyctenidae
remerging
self-cruelty
gegger
unpredicably
wharfages
Leno
extrahazardous
nonmischievous
sulfurized
microdontous
confessionalian
palliditarsate
superinsist
backspang
fit
capework
circumradii
scabiophobia
treacheries
anallagmatis
stuber
miniver
dinsome
Creel
urinations
supplicatingly
fullfaces
smoothnesses
snowflower
crannogs
epihyal
platinamin
squirelet
marsalas
Tyndareus
index
tide-locked
Gauntlett
Asellidae
eccyclema
daisy-painted
navicerts
hinderance
nonparabolic
yerking
well-erected
quarterbacking
akhara
understriking
unconfinement
funicular
tuedian
unmaniable
bioelectrical
psalteteria
rewardingness
overcurtain
nitrotoluol
Illinois
phycocolloid
Spartansburg
1080
morassy
-form
walkways
mites
Bhutia
diffidence
murthering
monoblepsis
nonalphabetically
anchietine
grayling
defaillance
inscribable
predestinationism
leach
yachtmanship
debuted
mammilliform
Wovoka
phantic
lame-brain
vesico-umbilical
chloroleucite
six-shafted
foolmonger
merrymake
forebespeak
claros
handbells
Politian
scarcen
brain-crumpled
unseemingly
chawbuck
superscribe
baby-face
unpetted
Mangifera
felonwort
riddled
pinnoite
polyphyletically
Hulme
Pucciniaceae
swindlership
Nolanville
pastors
appersonation
postdiscoidal
Susy
patroclinous
home-loving
Zoanthus
slim-waisted
Deschutes
unpuckers
seacatch
landlike
poach
retransplants
besnowing
Judean
practicableness
spacetime
SMASPU
unbreakable
titanoniobate
misdeserve
Plumularia
Laertiades
nontropical
abulic
unvulgarized
Volos
egoistic
Gardnerville
both
coparent
Xenocrates
emma
desponder
raspy
browsability
doolfu
gammerel
setarious
pessimism
prescribable
howling
contradictory
well-prosecuted
awabi
white-fleshed
table-faced
Neopilina
Sebright
competencies
hysteriac
BLOBS
Cetraria
processionalist
entangler
gonal
oreodontine
go-getterism
Ali
concordant
freehandedness
Wascott
trachelo-
belick
Lycopodiales
ungradually
muster-out
semidisk
wigs
hag
actuaries
tatters
kneehole
retabulate
homoptera
bord-and-pillar
kahawai
stagnates
rennase
edward
herbrough
DP
Tupis
wappenschaw
Pennatulidae
nudniks
broadband
Gildea
dusenwind
revealingness
semble
chelonin
guaiocums
aptly
pseudoskink
elevons
undecreasingly
wrothsome
elaine
armorist
philotechnical
Waylan
summered
topsiders
Nimocks
feudists
Iva
calories
Buerger
multibreak
zorils
sipidity
stoothing
butterflylike
lecanoscopic
listable
bridoons
Raninae
fortyish
cancellated
diaplexus
omnifacial
harsh-grating
carabideous
psychoprophylaxis
lituiform
subpeltated
synaptene
undermanning
still-continuing
shallow-brained
paraphilia
telecinematography
ethanols
irritative
sensiferous
untimbered
shriller
news-seeking
fluorinates
obsessiveness
mercantility
dungannonite
BEE
clearinghouse
banjo
mashing
Doelling
trichocystic
ferocity
Kasubian
ruby-eyed
peregrinations
allochromatic
coccus
residentially
self-repugnance
Hochman
bitter-endism
Maeander
maras
Aggarwal
Casatus
adjustage
Millda
raffishnesses
malfunction
syllabary
nonsubstitution
outbear
cerebellums
Chaldaical
counterchanged
dicoelous
glassblower
unstrengthening
outperform
Cos
telosynaptic
delayage
louisville
covariant
jampan
stentorine
chronotropism
penuckles
Viscount
deganglionate
Rhynd
think
centranth
tsimmes
surfeit-swelled
sneaped
monopody
unhent
gloat
kyanol
zephyr-fanned
excitingly
holl
unitemized
purushartha
farthings
cardamine
coffee-brown
ultracrepidarian
Half-moslem
unenterable
crystallizations
phenotype
sadhika
assonantic
reinspire
computerizes
schoolbooks
row-boat
ironheartedly
subjunct
pleasure-tired
Darra
osoberry
decriminalization
unmitred
escallops
finespun
tafwiz
diachyma
RITA
while
tam-o’-shanter
Lavallette
Kitasato
relegating
sextodecimos
expectorant
mauds
Scorpaenidae
auxology
cotillage
trueheartedly
betroths
unsafeguarded
seminasal
outyells
unfinable
hydrolytically
wisha
prohydrotropic
cormogen
preinquisition
hylology
hypolimnionia
pedocal
planform
transporters
gnomists
neshly
quadrifrontal
cut-price
photomacrography
noncompensating
soreheads
gallicola
afterdrain
winkled
Obeid
uniform
spring-board
clumproot
packinghouse
nonfeasibility
oddness
novelised
fadding
songlike
respring
prevariation
gourdworm
Pyrosomatidae
uncorven
Araxa
techiness
bleached
shide
hook-snouted
MFT
superdevilishly
catechizer
Treron
RIM
intendency
entrapment
tripaschal
heyduck
spirit-chilling
Changoan
all-availing
unagreed
whoremongering
immunogenetic
mislighting
semisocialistically
korona
sperone
Berkley
Rallinae
Audras
glucosidase
arsenetted
longhairs
unexplainably
halbert
castles
readdicting
Mansura
towelry
civilise
Violaceae
vice-architect
impersonate
keynesian
aspheric
demagnetized
pig-footed
hemihedron
Jezabella
trigonometrical
fricandelle
Ector
toccate
antecedaneous
heterophagous
USSCt
nose-up
noonday
ventricolumna
spectroheliography
kinetomeric
silicifluoride
unarousable
Sharpsburg
falderols
shittier
sieva
soller
byssi
cell
preacquitting
Nanuet
Derbent
Beckman
isosulphocyanate
deperdite
montmorillonitic
bilinguist
Jack-the-rags
ambulacrum
quincewort
breech-loading
soundheartedness
commissionating
clinah
Erma
Monahon
prefertility
grip
emyde
Elsey
orality
terrestriality
nonheritability
embolimeal
spifflicate
subchief
Balanta
tony
ionomers
Midway
inexistency
Tazewell
frolicful
djakarta
Stannwood
Scheel
nonsegregable
misshaped
dandy-roller
cross-pawl
deciduitis
heirship
preconfiguration
Torun
fiddle-faddled
slows
child-mindedness
flavorousness
Francoist
thy
cunningness
tepetate
expurgational
cps
jorums
inflexion
pixies
steel-digesting
ornary
electrography
Opilia
hyperelegantly
Potosi
bidgee-widgee
bout
kodaking
Jenette
rogueling
single-hoofed
yawney
sunspottery
Cariocan
skyjacks
tewly
acroataxia
conveyability
Cahuapana
Qum
scissor-winged
gaster-
ten-dollar
birds
underclift
Pan-mongolian
pro-Egyptian
misanthropi
chirimen
aywhere
adsmith
plie
isocarbostyril
parotidean
unwry
uppent
endophasia
neuroplasm
hissel
velds
she-fool
attatches
overbookish
coracomandibular
Pimpinella
Levant
tapadera
maat
Engedi
poppy-flowered
demodulator
overshadower
raclettes
pulpitical
unlearnableness
countersconce
close-bred
junks
earthiest
proud-minded
disponed
colophonate
paradigm
Vasti
unduchess
Ucalegon
tweed
vrows
megaton
drunkest
Habiru
Tetrabelodon
palatomaxillary
toluyl
hypersuggestibleness
samites
Fusulina
flamelike
pettygod
Auster
unrespectiveness
kangaroo-rat
ghostcraft
Piscataqua
graphiological
Arica
Croesus
greeny
ichorrhemia
disassembler
enneahedral
splenolymphatic
zamarra
Geoffry
consence
fourteens
neck-tie
nonirate
parental
detritus
uncensured
umpteenth
twice-negotiated
exhilarator
intervisitation
Charlena
mucronated
Ongun
epencephalons
generous-hearted
encoring
Krusche
Huntersville
black-tressed
jocooserie
inclinable
motiving
pickthatch
abeigh
Myrtle
wage-plug
latibulize
overtensely
beanbag
Oceola
untwist
rebounded
stripteased
instigated
ditches
conichalcite
shortenings
opaled
herrenvolk
rehaul
fantailed
methobromide
unclouding
coinquinate
throned
Brabazon
lobotomized
Marilou
trainmaster
Ardra
drivellingly
Lerona
jaunder
idiasm
overextends
disconvenient
Aphelops
suffixion
disfellowship
laparohepatotomy
filbert
cinderman
sociogram
pompoms
painkilling
Mahabharata
dudine
Hannastown
Henka
mazes
ravishedly
peats
fault-slip
nasiform
devouringly
substalagmite
uraline
Melisandra
non-English
cufflinks
unredemptive
guidwife
Evans
anise
unsymbolized
tinkerwise
repenalize
recidivous
dipppier
quenelle
baulkier
proportionability
-phony
Aeolidae
Cyrillaceae
inaptly
Amperian
promptuary
trophaea
outsparkle
epitheliomatous
likerous
undine
valiseful
Almagest
sternway
woad-painted
Lupinus
tilty
nondichogamic
sabre
dislikeful
Artocarpus
refiners
Seeder
woomeras
three-aisled
twistical
vermi-
alefnull
carpium
Barboza
astrometeorology
coderives
cursedest
barogram
coalitions
talesman
indols
annunciation
noncredibly
vaccines
well-accredited
young-looking
prize-fighter
helming
myelographically
quasi-ethical
straightforwardness
squalliest
girlhoods
off-color
bullit
postponement
hard-mouthed
abortionist
Cannstatt
crumblingness
rearhorse
subemarginate
inventory
men-children
cay
reremmice
ronnels
liberalizations
combinatorics
rheumiest
fire-retarded
albolite
drawings-in
rumina
peritoneoclysis
neguses
baggers
chuter
Naemorhedinae
lophin
dackered
perigon
serolipase
theaterless
autoimmunities
calderas
portmantle
microstomatous
Wenlock
Altamahaw
eye-lotion
incorrupt
cyclopentene
antigovernment
====
sometimes tokens
may appear in tests
so you better
write your program
in accordance with
the instructions set
out in the PDF
=====
seriously all you
have to do is treat
every line as a single string
===
eight
eleven
five
four
nine
one
seven
six
ten
three
twelve
two
-form
-phony
1080
AFB
Aeolidae
Aggarwal
Agricola
Ali
Almagest
Altamahaw
Amperian
Anglo-afghan
Aphelops
Araxa
Ardra
Arica
Artocarpus
Asellidae
Audras
Auster
BEE
BLOBS
BSRT
BUR
Balanta
Barboza
Beckman
Berkley
Bhutia
Bogalusa
Brabazon
Buerger
Burrton
Cahuapana
Cannstatt
Cariocan
Casatus
Cetraria
Chaldaical
Changoan
Charlena
Chetnik
Christ-borne
Collbaith
Cos
Creel
Criders
Croesus
Cyrillaceae
DP
Darra
Denn
Derbent
Deschutes
Doelling
Douglasville
Ector
Elsey
Engedi
Erma
Evans
Flindersia
Francoist
Fusulina
Gaige
Gardnerville
Gauntlett
Geoffry
Germanton
Gildea
Gymnasium
Habiru
Half-moslem
Hannastown
Haughton
Hazelcrest
Hebrew
Henka
Hochman
Hulme
Huntersville
Illinois
Iva
Jack-the-rags
Jenette
Jezabella
Judean
Kasubian
Keelung
Keos
Kiel
Kitasato
Krusche
Lach
Laertiades
Lavallette
Leno
Lerona
Levant
Linanthus
Logi
Loxiinae
Lupinus
Lycopodiales
MFT
Macrochires
Maeander
Mahabharata
Mangifera
Mansura
Marilou
Melisandra
Midway
Millda
Min
Moche
Monahon
Morrison
Myrtle
Naemorhedinae
Nanuet
Neopilina
Nierstein
Nimocks
Nolanville
Obeid
Oceola
Ongun
Opilia
Otariidae
Pan-Arabic
Pan-mongolian
Pennatulidae
Pimpinella
Piscataqua
Plumularia
Poiana
Politian
Polyctenidae
Potosi
Protobasidii
Pucciniaceae
Pyrosomatidae
Qum
RIM
RITA
Rallinae
Raninae
Rhynd
Robinsonville
SMASPU
Sango
Sara
Scheel
Scorpaenidae
Sebright
Seeder
Selene
Sharpsburg
Slavo-lithuanian
Spartansburg
Stannwood
Susy
Tarnopol
Tazewell
Tetrabelodon
Torun
Treron
Tupis
Tyndareus
USSCt
Ucalegon
Vasti
Viipuri
Violaceae
Viscount
Volos
Wascott
Waylan
Wenlock
Wovoka
Xenocrates
Zoanthus
abeigh
abortionist
abulic
accidentarily
acetabular
acidific
acroataxia
actuaries
adelantados
adjustage
adsmith
afterdrain
aims
akhara
albolite
alefnull
all-availing
allochromatic
amalgamation
ambulacrum
aminoazo
amuyong
anallagmatis
anchietine
anemopathy
anise
annunciation
antecedaneous
anthraquinol
anti-Roman
anticipatorily
antigovernment
antineutrons
antonomasia
apologete
appersonation
aptly
archgod
armorist
arsenetted
aspheric
assonantic
astrometeorology
athletism
attatches
autoimmunities
auxology
awabi
aywhere
baby-face
backspang
baggers
balneation
banjo
barogram
base-ball
bastioned
baulkier
beanbag
beglerbegship
belick
bementite
benumbment
besnowing
betroths
bidgee-widgee
bilinguist
bioelectrical
birds
bitter-endism
black-tressed
bleached
blowy
boanerges
bolting
bonzer
bord-and-pillar
both
bout
brain-crumpled
brattishing
breech-loading
bridoons
broadband
bronchiloquy
browsability
bullit
butterflylike
byssi
cacodylate
calderas
calories
camillus
cancellated
capework
carabideous
cardamine
carpium
castles
catechizer
catty-corner
cay
cell
centranth
cerebellums
chawbuck
chelonin
child-mindedness
chirimen
chloroleucite
chondroitin
chronotropism
chuter
cinderman
circumradii
civilise
claros
clearinghouse
clinah
close-bred
clumproot
coalitions
coccus
coderives
coffee-brown
coinquinate
colophonate
combinatorics
commissionating
competencies
computerizes
concordant
confessionalian
conichalcite
consence
consultants
contradictory
conveyability
coparent
coracomandibular
cormogen
correctable
cotillage
counterchanged
countersconce
covariant
cps
crannogs
cross-pawl
crumblingness
crystallizations
cufflinks
cunningness
cursedest
cut-price
cyclopentene
dackered
daisy-painted
dandy-roller
dawn
deafly
debuted
deciduitis
decriminalization
defaillance
deganglionate
delayage
demagnetized
demodulator
deperdite
desponder
detritus
devouringly
diachyma
diaplexus
dicoelous
diffidence
dilling
dinsome
dipppier
disassembler
disconvenient
disfellowship
dislikeful
disponed
dissociality
ditches
djakarta
dollship
doolfu
dosimetries
drawings-in
drivellingly
drunkest
dudine
dungannonite
dusenwind
dysanagnosia
earthiest
eccyclema
edward
egoistic
elaine
electrography
elevons
embolimeal
emma
emyde
encoring
endophasia
enneahedral
entangler
entrapment
epencephalons
epihyal
epitheliomatous
equisetic
escallops
essayish
ethanols
eucalyptic
euphroes
evocatory
excitingly
exhilarator
expectorant
expurgational
extrahazardous
eye-lotion
fadding
falderols
fantailed
farthings
fault-slip
felonwort
ferocity
feudists
fiddle-faddled
filbert
finespun
fire-retarded
fit
flamelike
flavorousness
florins
fluorinates
fogbows
foolmonger
forebespeak
foreseat
fortyish
fourteens
freehandedness
fricandelle
frolicful
frumpish
fullfaces
funicular
gallicola
gammerel
gaster-
gegger
generous-hearted
ghostcraft
girlhoods
glassblower
gloat
glucosidase
gnomists
go-getterism
gonal
goose-quill
gourdworm
gramineous
graphiological
grayling
greeny
grip
groundsman
guaiocums
guidwife
gunreach
hag
halbert
hallucinated
handbells
hard-mouthed
harsh-grating
heart-hardened
heirship
helming
hemihedron
herbrough
herrenvolk
heterophagous
heyduck
high-flavored
hinderance
hissel
holl
home-loving
homoptera
hook-snouted
horol.
hotch
howling
hyaloliparite
hydrolytically
hylology
hyperelegantly
hypersuggestibleness
hypolimnionia
hysteriac
ichorrhemia
idiasm
ignoration
imbitters
immunogenetic
impersonate
impressionable
inaptly
inclinable
incorrupt
index
indols
inexistency
inflexion
ingratitudes
inmate
inscribable
instigated
intendency
interdebating
interluency
interpubic
intervisitation
intraspecies
inventory
ionomers
ironheartedly
irritative
isocarbostyril
isosulphocyanate
jampan
jaunder
jocooserie
jorums
junks
kahawai
kangaroo-rat
keynesian
kinetomeric
kneehole
kodaking
korona
kyanol
l-arterenol
lame-brain
landlike
laparohepatotomy
latibulize
leach
lecanoscopic
legitim
liberalizations
life-enriching
likerous
lintiest
listable
lituiform
lobotomized
longhairs
lophin
louisville
luffer
maat
major-leaguer
malfunction
mammilliform
maras
marsalas
mashing
matchboxes
mauds
mazes
mealymouthedness
medics
megaton
men-children
mercantility
merrymake
mesosomatic
metal-sheathed
methobromide
microdontous
microstomatous
miniver
misanthropi
misdeserve
mislighting
misshaped
mites
monoblepsis
monopody
montmorillonitic
morassy
motiving
movie
mucronated
multibreak
multiview
murthering
muster-out
myelographically
nasiform
navicerts
neck-tie
neguses
neshly
neuroplasm
news-seeking
nitrotoluol
non-English
nonalphabetically
nonbody
noncompensating
noncredibly
nondichogamic
nonfeasibility
nonheritability
nonirate
nonmischievous
nonparabolic
nonprocedural
nonrelativity
nonsegregable
nonsubstitution
nontropical
noonday
nose-up
novelised
nudniks
nuts
obsessiveness
oddness
off-color
oil-laden
oligacanthous
omnifacial
opaled
orality
oreodontine
ornary
orthoplasy
osoberry
outbear
outflanks
outperform
outsparkle
outyells
overbookish
overcurtain
overextends
overhoping
overmarch
overprint
overshadower
overtensely
ovoplasmic
oxyluminescence
packinghouse
painkilling
palatomaxillary
palliditarsate
papalise
paradigm
paraphilia
parental
parotidean
parviflorous
pastors
patroclinous
payably
peats
pedocal
pellucidly
penuckles
peregrinations
perigon
peritoneoclysis
perron
pessimism
pettygod
phantic
phenotype
philotechnical
photomacrography
phycocolloid
phytoecological
pickthatch
pig-footed
pinnoite
pixies
planform
platinamin
pleasure-tired
plie
poach
polyphyletically
pompoms
poppy-flowered
portmantle
postdiscoidal
postponement
practicableness
pre-emptor
preacquitting
precardiac
preconfiguration
predestinationism
prefertility
preinquisition
premodeled
preponderate
prescribable
presubscriber
prevariation
primed
prize-fighter
pro-Egyptian
processionalist
prohydrotropic
promptuary
proportionability
prosopographical
proud-minded
psalteteria
pseudofluctuation
pseudoskink
psychoprophylaxis
pulpitical
pupfishes
purushartha
pyknoses
quadrifrontal
quarterbacking
quasi-ethical
quasi-realistic
quenelle
quincewort
raclettes
raffishnesses
raspy
ravishedly
re-enjoy
readdicting
rearhorse
rebounded
recidivous
reconfined
rectricial
red-swelling
redespise
refiners
regamble
rehaul
reinspire
relegating
remerging
rennase
repenalize
reprimandingly
reremmice
residentially
respring
retabulate
retransplants
revealingness
rewardingness
rheumiest
riddled
rogueling
ronnels
rose-hued
rouged
row-boat
ruby-eyed
rumina
rust-cankered
sabre
sadhika
saints
saloop
samites
sassandra
sauropsidan
scabiophobia
scarcen
schoolbooks
scissor-winged
screek
scrutinization
seacatch
self-cruelty
self-immurement
self-repugnance
semble
semidisk
seminasal
semisocialistically
sensiferous
sepulchres
serolipase
setarious
sextodecimos
shallow-brained
she-fool
shide
shittier
shortenings
shriller
siccar
sieva
silicifluoride
simianity
single-hoofed
sipidity
six-shafted
skier
skyjacks
slim-waisted
slows
smoothnesses
sneaped
snowflower
sociogram
sol
soller
songlike
soreheads
soundheartedness
spacetime
spectroheliography
sperone
spifflicate
spirit-chilling
splenolymphatic
spoons
spring-board
squalliest
squirelet
stagnates
statesboy
steel-digesting
stentorine
sternway
still-continuing
stockwork
stoothing
straightforwardness
streamingly
stripteased
stuber
stylopodium
subchief
subemarginate
subjunct
subpeltated
substalagmite
subventitious
suffixion
sulfurized
summered
sunspottery
superdevilishly
superinsist
superscribe
supplicatingly
surfeit-swelled
swaths
swindlership
syllabary
synaptene
syntactially
table-faced
tafwiz
talesman
tam-o’-shanter
tapadera
tatters
techiness
telecinematography
telosynaptic
ten-dollar
tepetate
terrestriality
tewly
theaterless
theorically
therologist
think
thoracicoacromial
three-aisled
throned
thy
tide-locked
tilty
tinkerwise
titanoniobate
toccate
toluyl
tony
topsiders
towelry
trachelo-
trainmaster
transferrotype
transporters
treacheries
trichocystic
trigonometrical
tripaschal
triticism
trophaea
trueheartedly
tsimmes
tuedian
turnmeter
tweed
twice-negotiated
twistical
ultracrepidarian
umpteenth
unagreed
unarousable
unbedecked
unbreakable
uncensured
unclouding
unconfinement
uncorven
undecreasingly
underclift
undermanning
understriking
undine
unduchess
unenterable
unexplainably
unfinable
unfrilled
ungradually
unhent
uniform
uninnocent
unitemized
unlearnableness
unmaniable
unmitred
unnitrogenous
unpalled
unpetted
unpredicably
unpuckers
unredemptive
unrespectiveness
unsafeguarded
unseemingly
unsignificant
unsparred
unstrengthening
unsymbolized
untimbered
untwist
unvulgarized
unwry
uppent
uraline
urinations
vaccines
valiseful
vaporoseness
velds
ventricolumna
vermi-
vesico-umbilical
vice-architect
vivificated
vrows
wage-plug
walkways
wappenschaw
water-living
wedgebill
well-accredited
well-erected
well-prosecuted
wharfages
while
white-fleshed
whoremongering
wigs
winches
winkled
wisha
woad-painted
wonton
woomeras
worldly-mindedness
wrothsome
yachtmanship
yawney
yerking
young-looking
zamarra
zephyr-fanned
zorils
====
sometimes tokens
may appear in tests
so you better
write your program
in accordance with
the instructions set
out in the PDF
=====
seriously all you
have to do is treat
every line as a single string
===
===
====
=====
every line as a single string
have to do is treat
in accordance with
may appear in tests
out in the PDF
seriously all you
so you better
sometimes tokens
the instructions set
write your program
Introduction to Data Structures and Algorithms
Programming Assignment 1
Our goal in this project is to build an Integer List ADT in C and use it to indirectly alphabetize the lines in a
file. This ADT module will also be used (with some modifications) in future programming assignments, so you
should test it thoroughly, even though not all of its features will be used here. Begin by reading the handout
ADT.pdf posted on the class webpage for a thorough explanation of the programming practices and conventions
required for implementing ADTs in C in this class.
Program Operation
The main program for this project will be called Lex.c. Your List ADT module will be contained in files
called List.h and List.c, and will export its services to the client module Lex.c. The required List operations are
specified in detail below. Lex.c will take two command line arguments giving the names of an input file and an
output file, respectively.
Lex
The input can be any text file. The output file will contain the same lines as the input, but arranged in
lexicographic (i.e. alphabetical) order. For example:
Input file:
Output file:
one
two
three
four
five
five
four
one
three
two
Lex.c will follow the sketch given below.
1. Check that there are two command line arguments (other than the program name Lex). Quit with a usage
message to stderr if more than or less than two command line arguments are given.
2. Count the number of lines n in the input file. Create a string array of length n and read in the lines of the
file as strings, placing them into the array. (Allocate this array from heap memory using functions
calloc() or malloc() defined in the header file stdlib.h. Do not use a variable length array. See
the comments here for more on this topic.)
3. Create a List whose elements are the indices of the above string array. These indices should be arranged
in an order that indirectly sorts the array. Using the above input file as an example we would have.
Indices: 0
Array: one
1
two
2
three
3
four
4
five
4
3
0
2
1
List:
To build the integer List in the correct order, begin with an initially empty List, then insert the indices of
the array one by one into the appropriate positions of the List. Use the Insertion Sort algorithm (section
2.1 of the text CLRS) as a guide to your thinking on how to accomplish this. (Please read the preceding
two sentences several times so that you understand what is required. You are not being asked to sort the
input array using Insertion Sort.) You may use only the List ADT operations defined below to manipulate
1
the List. Note that the C standard library string.h provides a function called strcmp() that determines
the lexicographic ordering of two Strings. If s1 and s2 are strings then:
strcmp(s1, s2)0 is true if and only if s1 comes after s2
strcmp(s1, s2)==0 is true if and only if s1 is identical to s2
4. Use the List constructed in (3) to print the array in alphabetical order to the output file. Note that at no
time is the array ever sorted. Instead you are indirectly sorting the array by building a List of indices in a
certain order.
See the example FileIO.c to learn about file input-output operations in C if you are not already familiar with them.
I will place a number of matched pairs of input-output files in the examples section, along with a python script
that creates random input files, along with their matched output files. You may use these tools to test your
program once it is up and running.
List ADT Specifications
Your list module for this project will be a bi-directional queue that includes a “cursor” to be used for iteration.
Think of the cursor as highlighting or underscoring a distinguished element in the list. Note that it is a valid state
for this ADT to have no distinguished element, i.e. the cursor may be “undefined” or “off the list”, which is in
fact its default state. Thus the set of “mathematical structures” for this ADT consists of all finite sequences of
integers in which at most one element is distinguished. A list has two ends referred to as “front” and “back”
respectively. The cursor will be used by the client to traverse the list in either direction. Each list element is
associated with an index ranging from 0 (front) to − 1 (back), where is the length of the list. Your List
module will export a List type along with the following operations.
// Constructors-Destructors ————————————————–List newList(void);
// Creates and returns a new empty List.
void freeList(List* pL); // Frees all heap memory associated with *pL, and sets
// *pL to NULL.
// Access functions ———————————————————-int length(List L); // Returns the number of elements in L.
int index(List L); // Returns index of cursor element if defined, -1 otherwise.
int front(List L); // Returns front element of L. Pre: length()>0
int back(List L);
// Returns back element of L. Pre: length()>0
int get(List L);
// Returns cursor element of L. Pre: length()>0, index()>=0
bool equals(List A, List B); // Returns true iff Lists A and B contain the same
// sequence of elements, returns false otherwise.
// Manipulation procedures —————————————————void clear(List L);
// Resets L to its original empty state.
void set(List L, int x); // Overwrites the cursor element’s data with x.
// Pre: length()>0, index()>=0
void moveFront(List L); // If L is non-empty, sets cursor under the front element,
// otherwise does nothing.
void moveBack(List L);
// If L is non-empty, sets cursor under the back element,
// otherwise does nothing.
void movePrev(List L);
// If cursor is defined and not at front, move cursor one
// step toward the front of L; if cursor is defined and at
// front, cursor becomes undefined; if cursor is undefined
// do nothing
void moveNext(List L);
// If cursor is defined and not at back, move cursor one
// step toward the back of L; if cursor is defined and at
// back, cursor becomes undefined; if cursor is undefined
// do nothing
2
void prepend(List L, int x); // Insert new element into L. If L is non-empty,
// insertion takes place before front element.
void append(List L, int x); // Insert new element into L. If L is non-empty,
// insertion takes place after back element.
void insertBefore(List L, int x); // Insert new element before cursor.
// Pre: length()>0, index()>=0
void insertAfter(List L, int x);
// Insert new element after cursor.
// Pre: length()>0, index()>=0
void deleteFront(List L); // Delete the front element. Pre: length()>0
void deleteBack(List L);
// Delete the back element. Pre: length()>0
void delete(List L);
// Delete cursor element, making cursor undefined.
// Pre: length()>0, index()>=0
// Other operations ———————————————————-void printList(FILE* out, List L); // Prints to the file pointed to by out, a
// string representation of L consisting
// of a space separated sequence of integers,
// with front on left.
List copyList(List L); // Returns a new List representing the same integer
// sequence as L. The cursor in the new list is undefined,
// regardless of the state of the cursor in L. The state
// of L is unchanged.
The above operations are required for full credit, though it is not expected that all will be used by the client module
in this project. The following operation is optional, and may come in handy in some future assignment:
List concatList(List A, List B);
// Returns a new List which is the concatenation of
// A and B. The cursor in the new List is undefined,
// regardless of the states of the cursors in A and B.
// The states of A and B are unchanged.
Notice that the above operations offer a standard method for the client to iterate in either direction over the
elements in a List. A typical loop in the client might appear as follows.
moveFront(L);
while( index(L)>=0 ){
x = get(L);
// do something with x
moveNext(L);
}
To iterate from back to front, replace moveFront() by moveBack() and moveNext() by movePrev(). One
could just as well set this up as a for loop. Observe that in the special case where L is empty, the cursor is
necessarily undefined, so that index(L) returns -1, making the loop repetition condition initially false.
Therefore the loop executes zero times, as it should on an empty List. It is required that function index() be
implemented efficiently, meaning that it should not itself contain a loop.
The underlying data structure for the List ADT will be a doubly linked list. The file List.c should therefore contain
a private (non-exported) struct called NodeObj and a pointer to that struct called Node. The struct NodeObj
should contain fields for an int (the data), and two Node references (the previous and next Nodes, respectively.)
You should also include a constructor and destructor for the private Node type. The private (non-exported) struct
ListObj should contain fields of type Node referring to the front, back and cursor elements, respectively. ListObj
should also contain int fields for the length of a List, and the index of the cursor element. When the cursor is
undefined, an appropriate value for the index field is -1, since that is what is returned by function index() in
such a case. Study the examples Queue.c and Stack.c on the course webpage, and feel free to use either file as a
starting point for List.c.
3
A sample test client will be placed on the webpage in Examples/pa1 called ListClient.c, which you will not submit.
This program should be considered to be a weak test of your List ADT. Its correct output is included as a comment
at the end of the file. Create your own test client for the List ADT called ListTest.c, and submit it with this
project. It should contain your own tests of all ADT operations.
You are required to submit a Makefile that creates an executable binary file called Lex, which is the main
program for this project. Include a clean target in your Makefile that removes Lex and any associated .o files
to aid the grader in cleaning the submit directory. MakeFile at the end of the page.
Note that the compile operations mentioned in the above Makefile call the gcc compiler with the flag std=c17. It is a requirement of this project (and all other C programs) that it compile without warnings or
errors under gcc (with the c17 flag), and run properly in the Linux computing environment on the UNIX
Timeshare unix.ucsc.edu provided by ITS. Your C programs must also run without memory leaks. Test
them using valgrind on unix.ucsc.edu by doing
valgrind program_name argument_list.
You must also submit a README.md file for this (and every) assignment. README.md will list each file
submitted, together with a brief description of its role in the project, along with any special notes to myself and
the grader. README.md is essentially a table of contents for the project, and nothing more. You will therefore
submit six files in all:
List.h
List.c
ListTest.c
Lex.c
Makefile
README.md
written by you
written by you
written by you
written by you
provided on webpage, alter as needed
written by you
Advi