-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
da81040
commit 1e80332
Showing
19 changed files
with
55 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
module main | ||
|
||
fn grains_on_square(square int) !u64 { | ||
|
||
} | ||
|
||
fn total_grains_on_board() u64 { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module main | ||
|
||
fn hello() string { | ||
return "Goodbye, Mars!" | ||
} | ||
return 'Goodbye, Mars!' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module main | ||
|
||
fn test_hello(){ | ||
assert hello() == "Hello, World!" | ||
} | ||
fn test_hello() { | ||
assert hello() == 'Hello, World!' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
module main | ||
|
||
fn nth_prime(n int) !int { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
module main | ||
|
||
fn count_nucleotides(strand string) !map[string]int { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
module main | ||
|
||
fn is_pangram(phrase string) bool { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,45 @@ | ||
module main | ||
|
||
fn test_empty_string() { | ||
assert !is_pangram("") | ||
assert !is_pangram('') | ||
} | ||
|
||
fn test_perfect_lower_case() { | ||
assert is_pangram("abcdefghijklmnopqrstuvwxyz") | ||
assert is_pangram('abcdefghijklmnopqrstuvwxyz') | ||
} | ||
|
||
fn test_perfect_only_case() { | ||
assert is_pangram("the quick brown fox jumps over the lazy dog") | ||
assert is_pangram('the quick brown fox jumps over the lazy dog') | ||
} | ||
|
||
fn test_missing_letter_x() { | ||
assert !is_pangram("a quick movement of the enemy will jeopardize five gunboats") | ||
assert !is_pangram('a quick movement of the enemy will jeopardize five gunboats') | ||
} | ||
|
||
fn test_missing_letter_h() { | ||
assert !is_pangram("five boxing wizards jump quickly at it") | ||
assert !is_pangram('five boxing wizards jump quickly at it') | ||
} | ||
|
||
fn test_with_underscores() { | ||
assert is_pangram("the_quick_brown_fox_jumps_over_the_lazy_dog") | ||
assert is_pangram('the_quick_brown_fox_jumps_over_the_lazy_dog') | ||
} | ||
|
||
fn test_with_numbers() { | ||
assert is_pangram("the 1 quick brown fox jumps over the 2 lazy dogs") | ||
assert is_pangram('the 1 quick brown fox jumps over the 2 lazy dogs') | ||
} | ||
|
||
fn test_letters_replaced_by_numbers() { | ||
assert !is_pangram("7h3 qu1ck brown fox jumps ov3r 7h3 lazy dog") | ||
assert !is_pangram('7h3 qu1ck brown fox jumps ov3r 7h3 lazy dog') | ||
} | ||
|
||
fn test_mixed_case_and_punctuation() { | ||
assert is_pangram("\"Five quacking Zephyrs jolt my wax bed.\"") | ||
assert is_pangram('"Five quacking Zephyrs jolt my wax bed."') | ||
} | ||
|
||
fn test_case_insensitive() { | ||
assert !is_pangram("the quick brown fox jumps over with lazy FX") | ||
assert !is_pangram('the quick brown fox jumps over with lazy FX') | ||
} | ||
|
||
fn test_a_m_lower_and_upper() { | ||
assert !is_pangram("abcdefghijklm ABCDEFGHIJKLM") | ||
} | ||
assert !is_pangram('abcdefghijklm ABCDEFGHIJKLM') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,4 @@ module main | |
|
||
// reverse_string returns a given string in reverse order | ||
fn reverse_string(str string) string { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
module main | ||
|
||
fn test_empty() { | ||
assert reverse_string("") == "" | ||
assert reverse_string('') == '' | ||
} | ||
|
||
fn test_word() { | ||
assert reverse_string("robot") == "tobor" | ||
assert reverse_string('robot') == 'tobor' | ||
} | ||
|
||
fn test_capitalized_word() { | ||
assert reverse_string("Ramen") == "nemaR" | ||
assert reverse_string('Ramen') == 'nemaR' | ||
} | ||
|
||
fn test_sentence_with_punctuation() { | ||
assert reverse_string("I'm hungry!") == "!yrgnuh m'I" | ||
} | ||
|
||
fn test_palindrome() { | ||
assert reverse_string("racecar") == "racecar" | ||
assert reverse_string('racecar') == 'racecar' | ||
} | ||
|
||
fn test_even_length_word() { | ||
assert reverse_string("drawer") == "reward" | ||
} | ||
assert reverse_string('drawer') == 'reward' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
module main | ||
|
||
fn test_empty_rna(){ | ||
assert to_rna('')=='' | ||
fn test_empty_rna() { | ||
assert to_rna('') == '' | ||
} | ||
|
||
fn test_cytosine_to_guanine(){ | ||
assert to_rna('C')=='G' | ||
fn test_cytosine_to_guanine() { | ||
assert to_rna('C') == 'G' | ||
} | ||
|
||
fn test_guanine_to_cytosine(){ | ||
assert to_rna('G')=='C' | ||
fn test_guanine_to_cytosine() { | ||
assert to_rna('G') == 'C' | ||
} | ||
|
||
fn test_thymine_to_adenine(){ | ||
assert to_rna('T')=='A' | ||
fn test_thymine_to_adenine() { | ||
assert to_rna('T') == 'A' | ||
} | ||
|
||
fn test_adenine_to_uracial(){ | ||
assert to_rna('A')=='U' | ||
fn test_adenine_to_uracial() { | ||
assert to_rna('A') == 'U' | ||
} | ||
|
||
fn test_rna_complement(){ | ||
fn test_rna_complement() { | ||
assert to_rna('ACGTGGTCTTAA') == 'UGCACCAGAAUU' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,31 @@ | ||
module main | ||
|
||
struct LinkedList { | ||
// define your data structure here | ||
mut: | ||
// define your data structure here | ||
len int // maintain the number of elements in the list in this field | ||
} | ||
|
||
fn new() LinkedList { | ||
|
||
} | ||
|
||
fn from_array(array []int) LinkedList { | ||
|
||
} | ||
|
||
fn (list LinkedList) is_empty() bool { | ||
|
||
} | ||
|
||
fn (mut list LinkedList) push(data int) { | ||
|
||
} | ||
|
||
fn (mut list LinkedList) pop() ?int { | ||
|
||
} | ||
|
||
fn (list LinkedList) peek() ?int { | ||
|
||
} | ||
|
||
fn (list LinkedList) to_array() []int { | ||
|
||
} | ||
|
||
fn (list LinkedList) reverse() LinkedList { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
module main | ||
|
||
fn is_isosceles(a f64, b f64, c f64) bool { | ||
|
||
} | ||
|
||
fn is_equilateral(a f64, b f64, c f64) bool { | ||
|
||
} | ||
|
||
fn is_scalene(a f64, b f64, c f64) bool { | ||
|
||
} | ||
} |