Skip to content

kaliakram/Word-Search-Optimization-Lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Word-Search-Optimization-Lab

A laboratory project on optimizing word-search operations using various Binary Search Tree (BST) variants, implemented first in Z (by Pr. Zegour at ESI Algiers) and then automatically translated to C.


Overview

This is the second lab of the ALSDD (Algorithms & Dynamic Data Structures) module at ESI Algiers. Its goals are to:

  • Deepen understanding of tree data structures, especially BSTs.
  • Experiment with self-adjusting BST variants to speed up word searches.
  • Compare three modified BSTs (BST1–3) against a standard BST (BST0).

Lab Components

1. Z Language Version

  • Compiler required: KHAWARIZM for Z
  • Behavioral variants:
    • BST1: On inserting a word beginning with X, Y, or Z, rotate it to the root.
    • BST2: On inserting a word beginning with X, Y, or Z, rotate it to the midpoint of its search path.
    • BST3: On inserting a word not beginning with X, Y, or Z, rotate it to the root.
  • Core requirements:
    • Implement standard BST operations (in-order traversal, breadth-first word count, etc.) to validate structure.
    • Implement single-word and range-word search methods.

2. C Language Version

  • Automatic translation: Generated by the Z compiler’s translation feature.
  • Enhancements:
    • Improved console display with colors for better visualization.
    • Implementation of BST0 (a standard, unmodified BST) for baseline comparison.
    • Simulation harness to collect and output performance data (note: full simulation wasn’t completed in this lab).

About

A lab concerned by optimizing words search using BST (binary search trees) variants in Z and C Languages

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages