Skip to content

Introductory/review programming assignment (1 of 3) in the C language for a course in operating systems.

Notifications You must be signed in to change notification settings

clunaslunas/msl-clang-001

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Binary Tree - Operating Systems Assignment 1

Usage

Find the line of code #define INPUT_INDEX "01" and change the 01 to match the input file. The input file should be named input01.txt and the program will create output01.txt where 01 is any 2 digit ID you choose.


The input file should contain a list of words on one single line like this:

the quick red fox jumps over the lazy brown dog

The program will load in the file, word by word, and create a binary tree out of the data. The tree is composed of nodes that contain a string of the word, a count of how many times that word appeared in the file, and pointers to the left and right nodes of the tree. It will then iterate through the tree and print the words in alphabetical order as follows:

brown: 1
dog: 1
fox: 1
jumps: 1
lazy: 1
over: 1
quick: 1
red: 1
the: 2

About

Introductory/review programming assignment (1 of 3) in the C language for a course in operating systems.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 98.1%
  • CMake 1.9%