Skip to content

Commit 028db8d

Browse files
authored
Merge pull request #20 from sir-gon/develop
[REFACTOR] Trying to re-organize source code and tests
2 parents 11f55fe + dcc166c commit 028db8d

File tree

12 files changed

+90
-36
lines changed

12 files changed

+90
-36
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# [Solve Me First](https://www.hackerrank.com/challenges/solve-me-first)
2+
3+
Difficulty: #easy
4+
Category: #warmup
5+
6+
Complete the function solveMeFirst to compute the sum of two integers.
7+
8+
## Example
9+
10+
$ a = 7 $ \
11+
$ b = 3 $
12+
13+
Return 10.
14+
15+
## Function Description
16+
17+
Complete the solveMeFirst function in the editor below.
18+
solveMeFirst has the following parameters:
19+
20+
- int a: the first value
21+
- int b: the second value
22+
23+
## Constraints
24+
25+
$ 1 \leq a, b \leq 1000 $
26+
27+
## Sample Input
28+
29+
```text
30+
a = 2
31+
b = 3
32+
```
33+
34+
## Sample Output
35+
36+
```text
37+
5
38+
```
39+
40+
## Explanation
41+
42+
```text
43+
2 + 3 = 5
44+
```

src/add.rs

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/hackerrank/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub mod warmup;

src/hackerrank/warmup/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub mod solve_me_first;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// @link Problem definition [[docs/hackerrank/warmup/solveMeFirst.md]]
2+
3+
pub fn solve_me_first(left: i32, right: i32) -> i32 {
4+
left + right
5+
}

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pub mod add;
1+
pub mod hackerrank;

tests/add.rs

Lines changed: 0 additions & 32 deletions
This file was deleted.
File renamed without changes.

tests/hackerrank/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub mod warmup;

tests/hackerrank/warmup/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub mod solve_me_first;

0 commit comments

Comments
 (0)