Giter VIP home page Giter VIP logo

algorithms's Introduction

Algorithms

Welcome to the Algorithms ! This project contains implementations of various algorithms in C++.

Table of Contents

Introduction

This repository contains a collection of algorithm implementations in C++. The goal of this project is to provide clear and efficient implementations of common algorithms used in computer science.

Project Structure

The project is organized as follows:

.
├── .gitattributes
├── .gitignore
├── Algorithms.sln
├── Algorithms.vcxproj
├── Algorithms.vcxproj.filters
├── BinarySearch.cpp
├── Fibonacci.cpp
├── LinearSearch.cpp
├── binarysearch.h
├── linearsearch.h
└── main.cpp
  • .gitattributes and .gitignore: Configuration files for git.
  • Algorithms.sln: Solution file for the project.
  • Algorithms.vcxproj and Algorithms.vcxproj.filters: Project files.
  • BinarySearch.cpp and binarysearch.h: Implementation and header files for the Binary Search algorithm.
  • Fibonacci.cpp: Implementation of the Fibonacci sequence algorithm.
  • LinearSearch.cpp and linearsearch.h: Implementation and header files for the Linear Search algorithm.
  • main.cpp: The main file to run and test the algorithms.

Algorithms Implemented

  1. Binary Search

    • BinarySearch.cpp
    • binarysearch.h
    • Binary search is an efficient algorithm for finding an item from a sorted list of items. It works by repeatedly dividing in half the portion of the list that could contain the item until you've narrowed down the possible locations to just one.
  2. Fibonacci Sequence

    • Fibonacci.cpp
    • This algorithm generates the Fibonacci sequence, where each number is the sum of the two preceding ones, starting from 0 and 1.
  3. Linear Search

    • LinearSearch.cpp
    • linearsearch.h
    • Linear search is a simple algorithm that checks every element in the list until the target value is found or the list ends.

Getting Started

Prerequisites

To run this project, you need:

  • A C++ compiler (e.g., g++, clang)

Building and Running

  1. Clone the repository:

    git clone https://github.com/EchoSingh/algorithms.git
    cd algorithms
  2. Compile the code:

    g++ -o algorithms main.cpp BinarySearch.cpp Fibonacci.cpp LinearSearch.cpp
  3. Run the executable:

    ./algorithms

License

This project is licensed under the MIT License - see the LICENSE file for details.

algorithms's People

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.