FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
hackerrank_elixir/test/algorithm/constructive_test.exs at master · boonious/hackerrank_elixir · GitHub
boonious
/
hackerrank_elixir
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
hackerrank_elixir
/
test
/
algorithm
/
constructive_test.exs
Copy path
More file actions
More file actions
Latest commit
History
History
History
17 lines (14 loc) · 551 Bytes
Breadcrumbs
hackerrank_elixir
/
test
/
algorithm
/
constructive_test.exs
Copy path
File metadata and controls
17 lines (14 loc) · 551 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
defmodule
AlgoConstructiveTest
do
use
ExUnit.Case
import
Algo.Constructive
doctest
Algo.Constructive
describe
"algorithm - constructive"
do
@
describetag
:constructive
# https://www.hackerrank.com/challenges/new-year-chaos/problem
test
"minimum_bribes - New year chaos, check feasibility/calculate bribes required for a queue scenarios"
do
assert
minimum_bribes
(
[
2
,
1
,
5
,
3
,
4
]
)
==
3
assert
minimum_bribes
(
[
2
,
5
,
1
,
3
,
4
]
)
==
"Too chaotic"
assert
minimum_bribes
(
[
1
,
2
,
5
,
3
,
7
,
8
,
6
,
4
]
)
==
7
end
end
end
Back
|
FazBrowse Home
|
New Git URL