algorithms

module
v0.0.0-...-9c3a112 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2020 License: MIT

Directories

Path Synopsis
Package coveringsubstring finds the smallest covering substring
Package coveringsubstring finds the smallest covering substring
hackerrank
arraycost
Package arraycost solves the folowwing problem: given an array B, make up another array A, such that 1<= A[i] <= B[i] and the sum of distances between neighbour elements ( named cost ) is maximised.
Package arraycost solves the folowwing problem: given an array B, make up another array A, such that 1<= A[i] <= B[i] and the sum of distances between neighbour elements ( named cost ) is maximised.
candies
Package candies solves this problem: given an array of numbers, associate to each of its elements, a number such that: 1.
Package candies solves this problem: given an array of numbers, associate to each of its elements, a number such that: 1.
change
Package change solves the change problem: Given some type of coins, in how many ways can you return a given change ? it is classic dynamic programming, i.e: recursive, overlapping sub cases with cache
Package change solves the change problem: Given some type of coins, in how many ways can you return a given change ? it is classic dynamic programming, i.e: recursive, overlapping sub cases with cache
commonchild
Package commonchild: https://www.hackerrank.com/challenges/common-child/problem Problem: A string is a child of another string, if it can be obtained from the second one by deleting character but preserving the order.
Package commonchild: https://www.hackerrank.com/challenges/common-child/problem Problem: A string is a child of another string, if it can be obtained from the second one by deleting character but preserving the order.
equal
Package equal solves the following problem: given a list of integers, you can transform it by adding 1,2 or 5 to all but one element the goal is for all elements to become equal, and do so with a minimum number of transformations e.g.: [1,2,5] ->(2) [3,4,5] ->(2) [5,6,5] ->(1) [6,6,6] Our solution is like this: 1.
Package equal solves the following problem: given a list of integers, you can transform it by adding 1,2 or 5 to all but one element the goal is for all elements to become equal, and do so with a minimum number of transformations e.g.: [1,2,5] ->(2) [3,4,5] ->(2) [5,6,5] ->(1) [6,6,6] Our solution is like this: 1.
intervalselection
Package intervalselection : https://www.hackerrank.com/challenges/interval-selection/problem Solution: Have all ends of the intervals in a new sorted array.
Package intervalselection : https://www.hackerrank.com/challenges/interval-selection/problem Solution: Have all ends of the intervals in a new sorted array.
knapsack
Package knapsack solves the unbounded knapsack problem.
Package knapsack solves the unbounded knapsack problem.
largestrectangle
Package largestrectangle : https://www.hackerrank.com/challenges/largest-rectangle/problem Problem: You are given an array of heights of buildings.
Package largestrectangle : https://www.hackerrank.com/challenges/largest-rectangle/problem Problem: You are given an array of heights of buildings.
queen
Package queen solves the N-queen attack problem, using backtracking
Package queen solves the N-queen attack problem, using backtracking
simpletexteditor
Package main : https://www.hackerrank.com/challenges/simple-text-editor/problem
Package main : https://www.hackerrank.com/challenges/simple-text-editor/problem
steadygene
Package steadygene: https://www.hackerrank.com/challenges/bear-and-steady-gene/problem Problem: We are given a string that contains at most four different characters, of length n ( multiple of 4 ).
Package steadygene: https://www.hackerrank.com/challenges/bear-and-steady-gene/problem Problem: We are given a string that contains at most four different characters, of length n ( multiple of 4 ).
stonedivision
https://www.hackerrank.com/challenges/stone-division-2/problem
https://www.hackerrank.com/challenges/stone-division-2/problem
substringdiff
Package substringdiff solves this problem: given two strings and an in k, find the longest "common" substring that differs in at most k characters.
Package substringdiff solves this problem: given two strings and an in k, find the longest "common" substring that differs in at most k characters.
validstring
Package validstring: https://www.hackerrank.com/challenges/sherlock-and-valid-string/problem
Package validstring: https://www.hackerrank.com/challenges/sherlock-and-valid-string/problem
Solution: The heuristic is to always make sure that we can continue with another operation after the current one.
Solution: The heuristic is to always make sure that we can continue with another operation after the current one.
slices
Package transformer assumes that a chain of transformations stops at a number smaller than max int64
Package transformer assumes that a chain of transformations stops at a number smaller than max int64

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL