Coder Social home page Coder Social logo

faridnec / cpp-linked-list-simulator Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1006 KB

C++ Interactive Linked List Console Simulator for Enhanced Understanding of Data Structures

License: MIT License

C++ 97.70% Makefile 2.30%
cpp data-structures linked-list list makefile mingw

cpp-linked-list-simulator's Introduction

C++ Interactive Linked List Console Simulator

This is an interactive console-based simulator for understanding and visualizing linked list data structures. The simulator provides a simulation for users to interact with and manipulate linked list nodes, facilitating a deeper understanding of data structure concepts.

Run using MinGW

To run this program, you will need to have the MinGW development environment installed on your machine. Once you have you can simply run

mingw32-make

This command will execute the default target in the makefile, which is all rule based on the provided makefile. This rule compiles all source files and links them into an executable.

Sample Console

Console Simulator

Key Components

  • LineList/SatirListesi Node Class: This component represents Single Linked List. The core building block of the linked list structure. Each node represents a data element in the list. The constructor initializes the head pointer with a unique approach, creating a head node containing the value -1 to serve as a separator and starting point.

SatirListesi Node

LineList Nodes

  • AdministratorList/YoneticiListesi Class: This component represents Doubly Linked List. This class manages the SatirListesi nodes, providing functionality for calculating averages of stored data and arranging nodes in ascending order based on these averages. The class enables dynamic sorting and navigation within the linked list structure, enhancing user interaction and understanding of data organization principles.

  • Menu Interface: Upon running the program, users are presented with a menu allowing them to navigate through the AdministratorList nodes, view the content of selected LineListesi objects, and perform various operations.

  • Navigation Controls: Users can move between nodes in the AdministratorList using z and c keys. The content of the selected LineListesi is displayed downward from the menu, allowing easy visualization.

  • Dynamic Display: The console interface dynamically updates to display 8 AdministratorList nodes at a time. Users can browse the entire list iteratively using a and d keys. For example, if there are 18 nodes in total, nodes 0-7 will be shown initially. When the user presses the d key, nodes 8-15 will appear on the screen, and when the next d key is pressed, nodes 16-17 will appear on the screen.

  • Node Deletion: Users can remove selected nodes from the AdministratorList using the p key. Additionally, pressing the k key deletes a random node from the RowList of the selected node, with the average recalculated and ManagerList updated accordingly.

List of Commands

Here is a list of terminal commands and their corresponding functionalities in the program:

  1. z key: Move to the previous node in the AdministratorList.
  2. c key: Move to the next node in the AdministratorList.
  3. a key: Browse to the previous set of 8 nodes in the AdministratorList.
  4. d key: Browse to the next set of 8 nodes in the AdministratorList.
  5. p key: Delete the selected node from the AdministratorList.
  6. k key: Delete a random node from the LineList of the selected node in the AdministratorList.

Documentation

This shows some of how to use the commands and console simulator

Simulation

Console Simulator

cpp-linked-list-simulator's People

Contributors

faridnec avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.