Some coding challenge answers and various other code.
WeightedRandomizer - A function to return a semi-random value based on the various weights of each possible value.
MinMaxMul - A function to return the minimum*maximum values within a sub-section of an array.
SumLists - Functions to sum the composite integers from two lists of integers.
StackMin - An integer stack with O(1) time push
, pop
, and min
methods.
reorderDigits - Takes an array of integers and a string of "asc" or "desc" and returns the array with the digits within each element sorted ascending or descending, respectively.
canPartition - Determines if one element of the array can be the product of all of the other digits in the array.