Skip to content

Releases: iamwill123/collection-of-algos

Sombrero Galaxy

01 Jul 16:34
Compare
Choose a tag to compare

List of current available algorithms

  generateRandomNumbers,
  nativeSort,
  bubbleSort,
  selectionSort,
  insertionSort,
  mergeSort,
  quickSort,
  heapSort,
  countSort,
  nCk,
  fibonacci,
  factorial,
  towerOfHanoi,
  generateAllBinaryStringsOfLenN,
  mergeTwoSortedArrIntoOne,
  1. generateRandomNumbers: This function is used to generate a sequence of random numbers. The sequence can be uniformly distributed or follow some other statistical distribution, depending on the specific requirements of the task.

  2. nativeSort: This is a built-in function in many programming languages that sorts a list or array. The specific algorithm used can vary but often includes efficient algorithms such as Quicksort, Mergesort, or Heapsort.

  3. bubbleSort: Bubble Sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order. The pass through the list is repeated until the list is sorted.

  4. selectionSort: Selection Sort is a simple sorting algorithm that sorts an array by repeatedly finding the minimum element from the unsorted part and putting it at the beginning. The algorithm maintains two subarrays in a given array.

  5. insertionSort: Insertion sort is a simple sorting algorithm that works similarly to the way you sort playing cards in your hands. The array is virtually split into a sorted and an unsorted region. Values from the unsorted region are picked and placed at the correct position in the sorted region.

  6. mergeSort: Merge Sort is a Divide and Conquer algorithm. It divides the input array into two halves, calls itself for the two halves, and then merges the two sorted halves.

  7. quickSort: QuickSort is a Divide and Conquer algorithm. It picks an element as a pivot and partitions the given array around the picked pivot. There are many different versions of quickSort that pick pivot in different ways.

  8. heapSort: HeapSort is a comparison-based sorting technique based on Binary Heap data structure. It is similar to selection sort where we first find the maximum element and place the maximum element at the end.

  9. countSort: Counting sort is a sorting technique based on keys between a specific range. It works by counting the number of objects having distinct key values. Then doing some arithmetic to calculate the position of each object in the output sequence.

  10. nCk (Combinations): This algorithm calculates the number of combinations of n items taken k at a time. It often uses the factorial function in its calculation.

  11. fibonacci: This algorithm generates the Fibonacci sequence, where each number is the sum of the two preceding ones, usually starting with 0 and 1.

  12. factorial: The factorial algorithm multiplies a given number by every number less than it down to 1. It's typically denoted as n!.

  13. towerOfHanoi: The Tower of Hanoi is a mathematical game or puzzle. The algorithm for solving the Tower of Hanoi puzzle with any number of disks takes advantage of recursion.

  14. generateAllBinaryStringsOfLenN: This algorithm generates all binary strings of length n. This is a common task in combinatorics and computer science.

  15. mergeTwoSortedArrIntoOne: This function merges two already sorted arrays/lists into a single sorted array/list. This operation is the heart of the merge sort algorithm.

What's Changed

Full Changelog: 1.0.46...1.0.57

Magellanic Clouds

28 May 21:01
Compare
Choose a tag to compare

Current list of available alogs:

generateRandomNumbers
nativeSort
bubbleSort
selectionSort
insertionSort
mergeSort
quickSort
heapSort
countSort

Switched back to NPM packages as the host for this library, reasons:

  1. Popularity and Community Support: npm (Node Package Manager) is the default package manager for Node.js and has been around since 2010, which has led to it being the most popular package manager for JavaScript. The large community provides great support and contributes to the extensive library of packages available.

  2. Extensive Package Registry: npm hosts the largest registry of JavaScript packages in the world, making it highly likely that you'll find a package you need.

  3. Ease of Use: npm is generally easy to use with simple commands to install, update, and manage dependencies in your projects.

  4. Semantic Versioning: npm packages follow semantic versioning rules, which help manage dependencies and ensure compatibility.

  5. npm Scripts: npm allows you to run scripts, which can be defined in the package.json file. This can be used to automate tasks such as testing, building, and deployment.

  6. Integration: npm is integrated with various continuous integration tools and is supported out of the box with many popular JavaScript frameworks and libraries.

Triangulum

27 May 16:19
Compare
Choose a tag to compare

Current list of available alogs:

  1. generateRandomNumbers
  2. nativeSort
  3. bubbleSort
  4. selectionSort
  5. insertionSort
  6. mergeSort
  7. quickSort
  8. heapSort
  9. countSort

Switched from npm package hosting to GitHub package hosting, here are some several benefits:

  1. Integration with GitHub: GitHub Packages is directly integrated into GitHub's platform. This means that you can use the same interface and the same set of credentials for both source control and package management, simplifying workflows and decreasing management overhead.

  2. Unified Access Control: GitHub Packages uses the same access permissions and roles as the GitHub repository it is associated with, providing a seamless and unified access control experience. You can manage code and package permissions at the same time in one place.

  3. Support for Multiple Package Types: Unlike npm which is JavaScript specific, GitHub Packages provides support for a variety of package management systems, including npm (JavaScript), NuGet (.NET), Maven (Java), RubyGems (Ruby), Docker images, and more.

  4. Versioning with Git Tags: GitHub Packages links package versions to Git tags, enabling a clear connection between the source code and the packaged software.

  5. Pull Request & Issue Integration: With GitHub Packages, it's easier to link between the package version and the corresponding pull request or issue on GitHub.

  6. Actions Integration: GitHub Packages integrates seamlessly with GitHub Actions, GitHub's CI/CD solution. For example, you can automate the process of publishing new package versions whenever you push a tag to your repository.

  7. Private and Public Packages: GitHub Packages allows you to host both private packages (for a fee, or free for public repositories). It's simple to keep internal packages private while publishing open-source software to the world.

Andromeda

16 May 23:18
3fde8ce
Compare
Choose a tag to compare

The current library release has these algos available:

nativeSort,
bubbleSort,
selectionSort,
insertionSort,
mergeSort,
quickSort,

The current documentation has these visualizations available

bubbleSort,
selectionSort,
insertionSort,