You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: config/problems.exs
+29-10
Original file line number
Diff line number
Diff line change
@@ -63,7 +63,9 @@ config :problems,
63
63
question: """
64
64
Write a concat function that takes two strings(binaries) and concantenates them, e.g:
65
65
66
-
concat("foo", "bar") #=> "foobar"
66
+
```elixir
67
+
concat("foo", "bar") #=> "foobar"
68
+
```
67
69
""",
68
70
solution: """
69
71
def concat(word1, word2) do
@@ -80,7 +82,10 @@ config :problems,
80
82
number: 005,
81
83
question: """
82
84
Write a function palindrome? that checks if a given string is a palindrome, A palindrome is a word, phrase, number, or other sequence of characters which reads the same backward or forward. e.g
83
-
palindrome?("madam") #=> true
85
+
86
+
```elixir
87
+
palindrome?("madam") #=> true
88
+
```
84
89
""",
85
90
solution: """
86
91
def palindrome?(word) do
@@ -99,7 +104,10 @@ config :problems,
99
104
number: 006,
100
105
question: """
101
106
Write a function anagram? that checks if two given strings are anagrams, An anagram is a type of word play, the result of rearranging the letters of a word or phrase to produce a new word or phrase, using all the original letters exactly once
107
+
108
+
```elixir
102
109
anagram?("rose", "sore") #=> true
110
+
```
103
111
""",
104
112
solution: """
105
113
def anagram?(word1, word2) do
@@ -120,7 +128,9 @@ config :problems,
120
128
question: """
121
129
Write an extract_bytes function that takes a binary and a non-negative integer and extracts the number of bytes specified by the integer, e.g:
Write a find_missing_char function that takes a same case alphabetical char list and returns the missing char if there is one otherwise returns nil, e.g:
Write a checksum function, that computes a parity byte checksum of a string (http://en.wikipedia.org/wiki/Checksum#Parity_byte_or_parity_word), e.g:
172
-
checksum("Elixir is fun.") #=> 95
183
+
Write a checksum function, that computes a [parity byte](http://en.wikipedia.org/wiki/Checksum#Parity_byte_or_parity_word) checksum of a string, e.g:
184
+
185
+
```elixir
186
+
checksum("Elixir is fun.") #=> 95
187
+
```
173
188
""",
174
189
solution: """
175
190
use Bitwise
@@ -196,7 +211,9 @@ config :problems,
196
211
question: """
197
212
Write a function join that takes a tuple(with elements that of type String, Integer, Float, Atom, CharList) and a separator and returns a string of the elements of the tuple joined by the separator, e.g:
198
213
199
-
join({1,2,3}, " ") #=> "1 2 3"
214
+
```elixir
215
+
join({1,2,3}, " ") #=> "1 2 3"
216
+
```
200
217
""",
201
218
solution: """
202
219
def join(tuple, separator) do
@@ -214,8 +231,10 @@ config :problems,
214
231
question: """
215
232
Given a list of strings, return a list of list of strings of anagrams, i.e. each element of the returned list is a list of words that are anagrams among them, e.g:
0 commit comments