Giter Site home page Giter Site logo

kevintudor / datastructures Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 1.12 MB

Apply design and development principles in the construction of software systems of varying complexity. Demonstrate proficiency in the concepts of an object oriented programming language (C++). Demonstrate basic understanding of commonly used data structures. Analyze the strengths and weaknesses of algorithms utilizing different data structures.

C++ 100.00%
algorithms-and-data-structures data-structures oop-principles cpp

datastructures's Introduction

DataStructures

Technology

  • IOstream: Iostream stands for standard input-output stream. This header file contains definitions of objects like cin, cout, cerr, etc. iomanip: iomanip stands for input-output manipulators. The methods declared in these files are used for manipulating streams. This file contains definitions of setw, setprecision, etc.
  • IOmanip: A library in C++ that is used to manage input and output formatting. It gives the user the power to control output formatting processes, such as alignment, text formatting, and numeric precision in the console for better data visualization.
  • fstream: This data type represents the file stream generally, and has the capabilities of both ofstream and ifstream which means it can create files, write information to files, and read information from files.
  • string: The standard string class provides support for such objects with an interface similar to that of a standard container of bytes, but adding features specifically designed to operate with strings of single-byte characters.
  • stdlib: This header defines several general purpose functions, including dynamic memory management, random number generation, communication with the environment, integer arithmetics, searching, sorting and converting.
  • cstdio: Input and Output operations can also be performed in C++ using the C Standard Input and Output Library (cstdio, known as stdio.h in the C language). This library uses what are called streams to operate with physical devices such as keyboards, printers, terminals or with any other type of files supported by the system. Streams are an abstraction to interact with these in an uniform way; All streams have similar properties independently of the individual characteristics of the physical media they are associated with.
  • vector: Just like arrays, vectors use contiguous storage locations for their elements, which means that their elements can also be accessed using offsets on regular pointers to its elements, and just as efficiently as in arrays. But unlike arrays, their size can change dynamically, with their storage being handled automatically by the container.
  • The purpose of this program is to check if two binary search trees are equal in size. This is done by searching the trees and counting the total number of nodes.
  • This is a simple program to experience writing code for binary trees. This is a CLASS implementation of the BST ADT. The program allows for insertion of nodes into the tree, deletion of nodes from the tree, sorting of the tree and printing the tree in full or by certain ranges. The program should be display the advantages and disadvantages of using such an implementation.

Output: Modified and Sorted Tree

  • The purpose of this program is to determine if a user inputs a valid date. The program will test the month, day, and year and echo back any portion of the date that is invalid. The program is able to determine if the year is a leap year. It also will determine if the particular month has 28,29,30 or 31 days depending on the month and if it is a leap year (for Febuary).
  • The purpose of this program is to convert a postfix expression to the corresponding fully-parenthesized infix expression.

Examples of postfix to infix evaluation (by hand)

  • postfix " 2 3 4 + 5 6 - - * "

  • 2 (3 4 +) 5 6 - - *

  • 2 "7" (5 6 -) - *

  • 2 (7 "1" -) *

  • (2 "8" *)

  • result " 16 "

  • The purpose of this program is to practice writing code for a simple queue class
  1. Manipulate pointers
  2. Allocate memory dynamically
  3. Implement a default constructor, copy constructor and destructor
  4. Use only one pointer to add to the back and to delete from the front of the queue.
  • Write a program that contains two recursive and one non-recursive functions
  1. A recursive boolean function called palindrome that accepts one string argument(for the user) and returns true if the string reads the same forward as it does backwards.For example madam, 463364, and "ABLE WAS I ERE I SAW ELBA" are all palindromes.
  2. A recursive function called printReverse that accepts one string argument(for the user) and returns the reverse of that string.
  3. A non-recursive function called printIterReverse that accepts one string argument(from the user) and returns the reverse of that string.
  • The purpose of this program is to practice writing code for a simple sentence class
  1. Manipulate pointers in a sentence class
  2. Utilize overloaded functions
  3. Implement a default constructor, copy constructor and destructor
  4. Delete all nodes containing even values.
  • The purpose of this program is to parse an input file and allocate each coresponding state and population to its own node. The program allows for insertion of nodes into the tree, deletion of nodes from the tree, sorting of the tree and printing the tree in full or by certain ranges. The program is then able to neatly output the sorted and altered data into a new file.

Output: state_data_update.txt

  • The purpose of this program is to learn how to create an empty default string constructor, populated explicit constructor, string palindrome checker, and string replace function.
  • use the vector class to manage a dynamic array
  1. Manage a vector(allocate and de-allocate memory, insert inorder, remove, etc).
  2. Implement a default constructor and a copy constructor.
  3. Implement an insert function to add a string, in order, into a vector
  4. Implement a remove function to delete a string from a vector

datastructures's People

Contributors

kevintudor avatar

Stargazers

Caesar Junior avatar  avatar

Watchers

 avatar

datastructures's Issues

Build configuration

The launch.json file executes however it does not have the proper configurations to auto build the .exe file causing the program to enter a infinite loop.

SimpleBST print loop

BST is not inserting data correctly causing the print function to loop the first two elements infinitely in test 1.

Revise the insert and the print functions.

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.