Skip to content

Commit

Permalink
pop-count: rename to eliuds-eggs (#1436)
Browse files Browse the repository at this point in the history
* Rename the `pop-count` exercise to `eliuds-eggs`.

* reorder exercise

* Rename module and files

* fix typo

* remove stray file

---------

Co-authored-by: Jeremie Gillet <[email protected]>
  • Loading branch information
ErikSchierboom and jiegillet authored Feb 3, 2024
1 parent 1fd78c1 commit 24d2fbb
Show file tree
Hide file tree
Showing 13 changed files with 50 additions and 50 deletions.
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
File renamed without changes.
File renamed without changes.
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.

0 comments on commit 24d2fbb

Please sign in to comment.