aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-307/wambash/julia/ch-1.jl14
-rw-r--r--challenge-307/wambash/julia/ch-2.jl13
2 files changed, 27 insertions, 0 deletions
diff --git a/challenge-307/wambash/julia/ch-1.jl b/challenge-307/wambash/julia/ch-1.jl
new file mode 100644
index 0000000000..c53f7440a0
--- /dev/null
+++ b/challenge-307/wambash/julia/ch-1.jl
@@ -0,0 +1,14 @@
+check_order(ints) = keys(ints)[ints.!==sort(ints)]
+
+
+using Test
+
+function TEST()
+ @testset "Check Order" begin
+ @test check_order([5, 2, 4, 3, 1]) == [1,3,4,5]
+ @test check_order([1, 2, 1, 1, 3]) == [2,4]
+ @test check_order([3, 1, 3, 2, 3]) == [1,2,4]
+ end
+end
+
+TEST()
diff --git a/challenge-307/wambash/julia/ch-2.jl b/challenge-307/wambash/julia/ch-2.jl
new file mode 100644
index 0000000000..251ebdf7f9
--- /dev/null
+++ b/challenge-307/wambash/julia/ch-2.jl
@@ -0,0 +1,13 @@
+using Lazy
+find_anagrams(words) = @>> words map(frequencies) unique length
+
+using Test
+
+function TEST()
+ @testset "Find Anagrams" begin
+ @test find_anagrams(["acca", "dog", "god", "perl", "repl"]) == 3
+ @test find_anagrams(["abba", "baba", "aabb", "ab", "ab"]) == 2
+ end
+end
+
+TEST()