Skip to content

brabentil/python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Algorithm Implementations

This repository contains various algorithm implementations in Python. Each algorithm is contained within its own subfolder, and each subfolder includes a main.py file that contains the code for the algorithm.

Directory Structure

The project is organized into two main categories:

  1. integers: Contains algorithms related to integer computations.
  2. strings: Contains algorithms related to string manipulations.

Integer Algorithms

The integers folder contains the following subfolders, each representing a different algorithm:

  • ArmstrongNumber: Code to check if a number is an Armstrong number.
  • EvenOrOdd: Code to determine if a number is even or odd.
  • Factorial: Code to compute the factorial of a number.
  • Fibonacci: Code to generate Fibonacci numbers.
  • NumberOfDigits: Code to count the number of digits in a number.
  • Palindrom: Code to check if a number is a palindrome.
  • PrimeNumber: Code to check if a number is prime.
  • reverseNumber: Code to reverse the digits of a number.
  • SumOfDigits: Code to sum the digits of a number.
  • SwapNumbers: Code to swap two numbers.

String Algorithms

The strings folder contains the following subfolders, each representing a different algorithm:

  • DuplicateCharacterCount: Code to find duplicate characters in a string.
  • Reverse String: Code to reverse an entire string.
  • ReverseEachWord: Code to reverse each word in a string.
  • OccurrenceOfEach: Code to find the number of occurences of each character in a string.

How to Run

Each subfolder contains a main.py file with the implementation of the algorithm. To run any of the algorithms, navigate to the respective subfolder and execute the main.py file.

For example, to run the Factorial algorithm:

cd integers/Factorial
python main.py

Prerequisites

  • Python 3.x

Contributing

If you would like to contribute, please fork the repository and submit a pull request with your changes.

License

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages