gymshark-challenge-golang

command module
v0.0.0-...-7abbaaa Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: MIT Imports: 5 Imported by: 0

README

Solution

1 - If the pack is less than the minimum element in array return the firts element of the array;

2 - If the pack is more than the minimum element in array, so we need to divide the pack with the maximum element less the pack;

3 - The algorithm doing the step 2 until the waste of the divide is less than 0;

4 - Afther step 3, the resuld should be reduce que result just with element inside the array.

Improvement

*** Get better peformance algoritm -> To do the step 3 inside the step 4 - can you refactore for me, pls?! 🤓 ***

Run Application

$ go run main.go

Test

For run all the unit tests cases in the challenge:

$ go test

Documentation

https://documenter.getpostman.com/view/7723976/TzRXARwF#1cbe209f-be76-4543-b4ce-2cbccd5b9d4f

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
src

Jump to

Keyboard shortcuts

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