Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pop-count: rename to eliuds-eggs #1436

Merged
merged 5 commits into from
Feb 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -1341,6 +1341,21 @@
],
"difficulty": 3
},
{
"slug": "eliuds-eggs",
"name": "Eliud's Eggs",
"uuid": "8a9d6e1e-9188-44c9-8681-ade84d340dd0",
"practices": [
"bit-manipulation"
],
"prerequisites": [
"bit-manipulation",
"multiple-clause-functions",
"pattern-matching",
"recursion"
],
"difficulty": 3
},
{
"slug": "flatten-array",
"name": "Flatten Array",
Expand Down Expand Up @@ -1582,21 +1597,6 @@
],
"difficulty": 3
},
{
"slug": "pop-count",
"name": "Eliud's Eggs",
"uuid": "8a9d6e1e-9188-44c9-8681-ade84d340dd0",
"practices": [
"bit-manipulation"
],
"prerequisites": [
"bit-manipulation",
"multiple-clause-functions",
"pattern-matching",
"recursion"
],
"difficulty": 3
},
{
"slug": "prime-factors",
"name": "Prime Factors",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
],
"files": {
"solution": [
"lib/pop_count.ex"
"lib/eliuds_eggs.ex"
],
"test": [
"test/pop_count_test.exs"
"test/eliuds_eggs_test.exs"
],
"example": [
".meta/example.ex"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Bitwise

defmodule PopCount do
defmodule EliudsEggs do
@doc """
Given the number, count the number of eggs.
"""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule PopCount do
defmodule EliudsEggs do
@doc """
Given the number, count the number of eggs.
"""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
defmodule PopCount.MixProject do
defmodule EliudsEggs.MixProject do
use Mix.Project

def project do
[
app: :pop_count,
app: :eliuds_eggs,
version: "0.1.0",
# elixir: "~> 1.8",
start_permanent: Mix.env() == :prod,
Expand Down
29 changes: 29 additions & 0 deletions exercises/practice/eliuds-eggs/test/eliuds_eggs_test.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
defmodule EliudsEggsTest do
use ExUnit.Case

describe "egg count" do
test "0 eggs" do
assert EliudsEggs.egg_count(0) == 0
end

@tag :pending
test "1 egg" do
assert EliudsEggs.egg_count(16) == 1
end

@tag :pending
test "4 eggs" do
assert EliudsEggs.egg_count(89) == 4
end

@tag :pending
test "13 eggs" do
assert EliudsEggs.egg_count(2_000_000_000) == 13
end

@tag :pending
test "100 eggs" do
assert EliudsEggs.egg_count(1_267_650_600_228_229_401_496_703_205_375) == 100
end
end
end
29 changes: 0 additions & 29 deletions exercises/practice/pop-count/test/pop_count_test.exs

This file was deleted.

Loading