Skip to content

Commit 1fff3c4

Browse files
exercise stubs - part 4 of 4 (#287)
[no important files changed]
1 parent 61ac917 commit 1fff3c4

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed

exercises/practice/circular-buffer/source/circular_buffer.d

+29
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
11
module circular;
22

3+
class Buffer(ElementType)
4+
{
5+
public:
6+
this(size_t capacity)
7+
{
8+
// implement this function
9+
}
10+
11+
ElementType pop()
12+
{
13+
// implement this function
14+
}
15+
16+
void push(ElementType element)
17+
{
18+
// implement this function
19+
}
20+
21+
void clear()
22+
{
23+
// implement this function
24+
}
25+
26+
void forcePush(ElementType element)
27+
{
28+
// implement this function
29+
}
30+
}
31+
332
unittest
433
{
534
import std.exception : assertThrown;

exercises/practice/run-length-encoding/source/run_length_encoding.d

+10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
module run_length_encoding;
22

3+
pure string encode(immutable string input)
4+
{
5+
// implement this function
6+
}
7+
8+
pure string decode(immutable string input)
9+
{
10+
// implement this function
11+
}
12+
313
unittest
414
{
515
immutable int allTestsEnabled = 0;

exercises/practice/sum-of-multiples/source/sum_of_multiples.d

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
module sum_of_multiples;
22

3+
pure int calculateSum(immutable int[] factors, immutable int limit)
4+
{
5+
// implement this function
6+
}
7+
38
unittest
49
{
510
immutable int allTestsEnabled = 0;

0 commit comments

Comments
 (0)