Skip to content

aninaslyan/Algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Algorithms

Algorithms are step-by-step procedures or formulas for solving problems or performing tasks. In computer science and mathematics, algorithms are used to manipulate data, perform calculations, and automate reasoning.

Types of Algorithms:

  • Cipher
    • Caesar - shifts the letters in the plaintext by a fixed number.
    • Character Frequency - uses the frequency of characters in the plaintext to encrypt it.
    • Distributed Secret - uses a secret key to encrypt the plaintext.
    • Playfair - uses a 5x5 grid of letters to encrypt the plaintext.
    • Simple Replacement - replaces each letter in the plaintext with another letter.
    • Hamming Code (with UI) - detects and corrects errors in the transmitted data.
  • Search
    • Linear - O(n) - iterates through each element in the array from the start to the end.
    • Binary - O(log n) - searches for an element in a sorted array by dividing the array in half at each step.
  • Sort
    • Selection - O(n^2) - selects the smallest (or biggest) element from the unsorted portion of the array and swaps it with the first (or last) unsorted element.
    • Insertion - O(n^2) - builds the sorted array one element at a time by comparing each element with the rest of the array.
    • Bubble - O(n^2) - compares each element with the next one and swaps them if they are in the wrong order.
    • Quick - O(n log n) - divides the array into two subarrays and sorts them recursively.
    • Merge - O(n log n) - divides the array into two subarrays and merges them recursively.

About

Implementation of some really useful algorithms

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors