Skip to content

EKAlgorithms contains some well known CS algorithms and other stuff.

License

Notifications You must be signed in to change notification settings

trawor/EKAlgorithms

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

EKAlgorithms

EKAlgorithms is a gradually increasing bunch of algorithms in which some well known CS algorithms, data structures & others are implemented in Objective-C language.
I will be posting new algorithms, stay in touch.

Array

  1. Index of maximum element in array.
  2. Find longest string in array of strings.
  3. Find shortest string in array of strings.
  4. Array reverse.
  5. Intersection of two arrays.
  6. Union of two arrays (with remove duplicates).
  7. Find duplicates.
  8. Array with N unique/not unique random objects.

Search

  1. Linear search.
  2. Binary search.

Sort

  1. Bubble sort.
  2. Shell sort.
  3. Merge sort.
  4. Quick sort.
  5. Insertion sort.
  6. Selection sort.
  7. Heap sort.

String

  1. Palindrome or not.
  2. String reverse.
  3. Words count.
  4. Permutations of string.
  5. Occurrences of each character (a - z).
  6. Count "needles" in a "haystack".
  7. Random string.
  8. Concatenation of two strings.
  9. Find 1st occurrence of "needle" in a "haystack".
  10. Last occurrence of "needle" in a "haystack".

Number

  1. Sieve of Eratosthenes.
  2. Great common divisor (GCD).
  3. Least common multiple (LCM).
  4. Factorial.
  5. Fibonacci numbers.
  6. Sum of digits.
  7. Binary to decimal conversion.
  8. Decimal to binary conversion.
  9. Fast exponentiation.
  10. Number reverse.
  11. Even/odd check.
  12. Leap year check.
  13. Armstrong number check.
  14. Prime number check.

Data structures

  1. Stack (LIFO).
  2. Queue (FIFO).
  3. Deque.
  4. Linked list.
  5. Graph
    • DFS (depth-first search);
    • BFS (breadth-first search).
  6. Binary search tree (BST).

Contributions

All the algorithms are compiled for the self educational purposes only and are not intended to be the best "Big O" solution.
But I hope EKAlgorithms can serve you as an excellent starting point for the beginning of an in-depth study of algorithms and their optimization.
So pull requests are welcome! If you want to do something, please open an issue first.

Bitdeli Badge

About

EKAlgorithms contains some well known CS algorithms and other stuff.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 100.0%