Skip to content

Simulation of Distributions for Randomly Generated Values and Introduction to Algorithms

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

AlphaPrime7/adeckstats

Repository files navigation

adeckstats

The goal of adeckstats is to …

Installation

You can install the development version of adeckstats like so:

devtools::install_github('norepoforyousucker')

Example

This is a basic example which shows you how to solve a common problem:

library(adeckstats)
adeckstats::adeck_binarysearch(c(1,2,3),2)
#> The searched key 2 is found in index 2 of the target vector
#> [1] 2

—- $SPECIAL TOPICS$ ——

A look at special topics I am learning and using to develop this package. This is the ultimate intersection of learning and development.

—- $ALGORITHMS$ ——

Search Algorithms

The aim is to do one a day and master algorithms, starting with search algorithms.

Binary Search Algorithm

adeckstats::adeck_binarysearch(c(1,2,3,4,5), 1)
#> The searched key 1 is found in index 1 of the target vector
#> [1] 1

Time and Space Complexity

Time Complexity:

Drivers are Input size (n), Basic operations (e.g. comparisons in a sorting algorithm), and Asymptotic analysis (behavior of the algorithm as n approaches infinity).

Calculating Time complexity involves:

  • Identify n
  • count the basic operations
  • combine operations (add for sequential ops and product for nest ops)
  • Use asymptotic notation focusing on the term that grows fastest and n increases

Space Complexity:

The binary search algorithms halves the search space and this algorithm really sank in when i understood this benefit.

About

Simulation of Distributions for Randomly Generated Values and Introduction to Algorithms

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages