trackler 2.0.8.37 → 2.0.8.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/trackler/version.rb +1 -1
- data/tracks/delphi/config.json +1 -1
- data/tracks/delphi/docs/ABOUT.md +1 -1
- data/tracks/elm/exercises/nucleotide-count/Tests.elm +1 -1
- data/tracks/r/config.json +45 -0
- data/tracks/r/exercises/anagram/test_anagram.R +1 -1
- data/tracks/r/exercises/bob/test_bob.R +1 -1
- data/tracks/r/exercises/difference-of-squares/test_difference-of-squares.R +1 -1
- data/tracks/r/exercises/grains/test_grains.R +2 -2
- data/tracks/r/exercises/hamming/test_hamming.R +1 -1
- data/tracks/r/exercises/hello-world/test_hello-world.R +1 -1
- data/tracks/r/exercises/isogram/example.R +9 -0
- data/tracks/r/exercises/isogram/isogram.R +3 -0
- data/tracks/r/exercises/isogram/test_isogram.R +44 -0
- data/tracks/r/exercises/largest-series-product/example.R +22 -0
- data/tracks/r/exercises/largest-series-product/largest-series-product.R +3 -0
- data/tracks/r/exercises/largest-series-product/test_largest-series-product.R +110 -0
- data/tracks/r/exercises/leap/test_leap.R +1 -1
- data/tracks/r/exercises/luhn/test_luhn.R +1 -1
- data/tracks/r/exercises/pascals-triangle/example.R +27 -0
- data/tracks/r/exercises/pascals-triangle/pascals-triangle.R +3 -0
- data/tracks/r/exercises/pascals-triangle/test_pascals-triangle.R +32 -0
- data/tracks/r/exercises/perfect-numbers/example.R +22 -0
- data/tracks/r/exercises/perfect-numbers/perfect-numbers.R +3 -0
- data/tracks/r/exercises/perfect-numbers/test_perfect-numbers.R +59 -0
- data/tracks/r/exercises/phone-number/test_phone-number.R +1 -1
- data/tracks/r/exercises/prime-factors/example.R +14 -0
- data/tracks/r/exercises/prime-factors/prime-factors.R +3 -0
- data/tracks/r/exercises/prime-factors/test_prime-factors.R +50 -0
- data/tracks/r/exercises/raindrops/test_raindrops.R +1 -1
- data/tracks/r/exercises/rna-transcription/example.R +14 -0
- data/tracks/r/exercises/rna-transcription/rna-transcription.R +3 -0
- data/tracks/r/exercises/rna-transcription/test_rna-transcription.R +44 -0
- data/tracks/r/exercises/rotational-cipher/example.R +22 -0
- data/tracks/r/exercises/rotational-cipher/rotational-cipher.R +3 -0
- data/tracks/r/exercises/rotational-cipher/test_rotational-cipher.R +64 -0
- data/tracks/r/exercises/scrabble-score/example.R +19 -0
- data/tracks/r/exercises/scrabble-score/scrabble-score.R +3 -0
- data/tracks/r/exercises/scrabble-score/test_scrabble-score.R +59 -0
- data/tracks/r/exercises/secret-handshake/test_secret-handshake.R +1 -1
- data/tracks/r/exercises/sieve/test_sieve.R +1 -1
- data/tracks/r/exercises/space-age/test_space-age.R +1 -1
- data/tracks/r/exercises/sum-of-multiples/test_sum-of-multiples.R +2 -2
- data/tracks/r/exercises/tournament/example.R +35 -0
- data/tracks/r/exercises/tournament/test_tournament.R +140 -0
- data/tracks/r/exercises/tournament/tournament.R +3 -0
- data/tracks/r/exercises/word-count/test_word-count.R +1 -1
- metadata +29 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fcc166e36a7b734f6e7c78d015a93311bb78eb39
|
4
|
+
data.tar.gz: f7439a7ec5b911ba95a279186d799368c895db5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bee112127f3bd191392aadd16e0a8b7d6f7b245debddf91f48b8066ec12d79b3890e78d8a5149807e9ce1a38f4356942a99ee43a28ce769aac5bad86c4b358a5
|
7
|
+
data.tar.gz: a73867dadaf36325e0e92a64bc6638541f105fffd3b60e30bb8534beb86cd3f37df6821bd1c1b7edbc5b38cec31075ba7285c1e6b4a4e309bf6c04e85bf71b5e
|
data/lib/trackler/version.rb
CHANGED
data/tracks/delphi/config.json
CHANGED
data/tracks/delphi/docs/ABOUT.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
## Delphi (programming language) ##
|
2
2
|
*From Wikipedia, the free encyclopedia*
|
3
3
|
|
4
|
-
**Embarcadero Delphi** is a [programming language](https://en.wikipedia.org/wiki/Programming_language) and [software development kit](https://en.wikipedia.org/wiki/Software_development_kit) (SDK) for [desktop](https://en.wikipedia.org/wiki/Graphical_user_interface), [mobile](https://en.wikipedia.org/wiki/Mobile_app), [web](https://en.wikipedia.org/wiki/Web_application), and [console](https://en.wikipedia.org/wiki/Console_application) applications.[[1]](https://en.wikipedia.org/wiki/Delphi_(programming_language)#cite_note-Buchanan2003-1) Delphi's compilers use their own [Object Pascal](https://en.wikipedia.org/wiki/Object_Pascal) dialect of [Pascal](https://en.wikipedia.org/wiki/Pascal_(programming_language)) and generate native code for several platforms: Windows ([x86](https://en.wikipedia.org/wiki/IA-32) and [x64](https://en.wikipedia.org/wiki/X86-64)), [OS X](https://en.wikipedia.org/wiki/MacOS) (32-bit only), [iOS](https://en.wikipedia.org/wiki/IOS) (32 and 64-bit)
|
4
|
+
**Embarcadero Delphi** is a [programming language](https://en.wikipedia.org/wiki/Programming_language) and [software development kit](https://en.wikipedia.org/wiki/Software_development_kit) (SDK) for [desktop](https://en.wikipedia.org/wiki/Graphical_user_interface), [mobile](https://en.wikipedia.org/wiki/Mobile_app), [web](https://en.wikipedia.org/wiki/Web_application), and [console](https://en.wikipedia.org/wiki/Console_application) applications.[[1]](https://en.wikipedia.org/wiki/Delphi_(programming_language)#cite_note-Buchanan2003-1) Delphi's compilers use their own [Object Pascal](https://en.wikipedia.org/wiki/Object_Pascal) dialect of [Pascal](https://en.wikipedia.org/wiki/Pascal_(programming_language)) and generate native code for several platforms: Windows ([x86](https://en.wikipedia.org/wiki/IA-32) and [x64](https://en.wikipedia.org/wiki/X86-64)), [OS X](https://en.wikipedia.org/wiki/MacOS) (32-bit only), [iOS](https://en.wikipedia.org/wiki/IOS) (32 and 64-bit), [Android](https://en.wikipedia.org/wiki/Android_(operating_system)), and 64 bit [Linux](https://en.wikipedia.org/wiki/Linux).
|
5
5
|
|
6
6
|
Delphi, part of [RAD Studio](https://en.wikipedia.org/wiki/Delphi_(programming_language)#RAD_Studio), includes a code editor with [Code Insight](https://en.wikipedia.org/wiki/Code_Insight) ([code completion](https://en.wikipedia.org/wiki/Autocomplete#In_source_code_editors)), [Error Insight](https://en.wikipedia.org/wiki/Error_Insight) (real-time error-checking), and other features; [refactoring](https://en.wikipedia.org/wiki/Code_refactoring); a visual forms designer for both [VCL](https://en.wikipedia.org/wiki/Visual_Component_Library) (native Windows) and [FMX](https://en.wikipedia.org/wiki/FireMonkey) (cross-platform, partially native per platform); an integrated debugger for all platforms including mobile; source control ([SVN](https://en.wikipedia.org/wiki/Apache_Subversion), [git](https://en.wikipedia.org/wiki/Git), and [Mercurial](https://en.wikipedia.org/wiki/Mercurial)); and support for third-party plugins. It has strong database support. Delphi is remarkably fast to compile:[[2]](https://en.wikipedia.org/wiki/Delphi_(programming_language)#cite_note-2) unlike any other common languages, including C# and Swift, it is not unusual for a Delphi project of a million lines to compile in a few seconds – one benchmark gave 170,000 lines per second.[[3]](https://en.wikipedia.org/wiki/Delphi_(programming_language)#cite_note-3)[[4]](https://en.wikipedia.org/wiki/Delphi_(programming_language)#cite_note-4) It is under active development, with (in 2016) releases every six months, with new platforms being added approximately every second release.[[5]](https://en.wikipedia.org/wiki/Delphi_(programming_language)#cite_note-5)
|
7
7
|
|
@@ -16,7 +16,7 @@ tests =
|
|
16
16
|
\() ->
|
17
17
|
Expect.equal { a = 0, t = 0, c = 0, g = 0 }
|
18
18
|
(nucleotideCounts "")
|
19
|
-
, test "repetitive
|
19
|
+
, test "repetitive sequence has only guanine" <|
|
20
20
|
\() ->
|
21
21
|
Expect.equal { a = 0, t = 0, c = 0, g = 8 }
|
22
22
|
(nucleotideCounts "GGGGGGGG")
|
data/tracks/r/config.json
CHANGED
@@ -89,6 +89,51 @@
|
|
89
89
|
"difficulty": 1,
|
90
90
|
"slug": "sieve",
|
91
91
|
"topics": []
|
92
|
+
},
|
93
|
+
{
|
94
|
+
"difficulty": 1,
|
95
|
+
"slug": "prime-factors",
|
96
|
+
"topics": []
|
97
|
+
},
|
98
|
+
{
|
99
|
+
"difficulty": 1,
|
100
|
+
"slug": "largest-series-product",
|
101
|
+
"topics": []
|
102
|
+
},
|
103
|
+
{
|
104
|
+
"difficulty": 1,
|
105
|
+
"slug": "scrabble-score",
|
106
|
+
"topics": []
|
107
|
+
},
|
108
|
+
{
|
109
|
+
"difficulty": 1,
|
110
|
+
"slug": "perfect-numbers",
|
111
|
+
"topics": []
|
112
|
+
},
|
113
|
+
{
|
114
|
+
"difficulty": 1,
|
115
|
+
"slug": "pascals-triangle",
|
116
|
+
"topics": []
|
117
|
+
},
|
118
|
+
{
|
119
|
+
"difficulty": 1,
|
120
|
+
"slug": "rotational-cipher",
|
121
|
+
"topics": []
|
122
|
+
},
|
123
|
+
{
|
124
|
+
"difficulty": 1,
|
125
|
+
"slug": "tournament",
|
126
|
+
"topics": []
|
127
|
+
},
|
128
|
+
{
|
129
|
+
"difficulty": 1,
|
130
|
+
"slug": "rna-transcription",
|
131
|
+
"topics": []
|
132
|
+
},
|
133
|
+
{
|
134
|
+
"difficulty": 1,
|
135
|
+
"slug": "isogram",
|
136
|
+
"topics": []
|
92
137
|
}
|
93
138
|
]
|
94
139
|
}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
source('./isogram.R')
|
2
|
+
library(testthat)
|
3
|
+
|
4
|
+
test_that("empty string", {
|
5
|
+
word <- ""
|
6
|
+
expect_equal(is_isogram(word), TRUE)
|
7
|
+
})
|
8
|
+
|
9
|
+
test_that("isogram with only lower case characters", {
|
10
|
+
word <- "isogram"
|
11
|
+
expect_equal(is_isogram(word), TRUE)
|
12
|
+
})
|
13
|
+
|
14
|
+
test_that("word with one duplicated character", {
|
15
|
+
word <- "eleven"
|
16
|
+
expect_equal(is_isogram(word), FALSE)
|
17
|
+
})
|
18
|
+
|
19
|
+
test_that("longest reported english isogram", {
|
20
|
+
word <- "subdermatoglyphic"
|
21
|
+
expect_equal(is_isogram(word), TRUE)
|
22
|
+
})
|
23
|
+
|
24
|
+
test_that("word with duplicated character in mixed case", {
|
25
|
+
word <- "Alphabet"
|
26
|
+
expect_equal(is_isogram(word), FALSE)
|
27
|
+
})
|
28
|
+
|
29
|
+
test_that("hypothetical isogrammic word with hyphen", {
|
30
|
+
word <- "thumbscrew-japingly"
|
31
|
+
expect_equal(is_isogram(word), TRUE)
|
32
|
+
})
|
33
|
+
|
34
|
+
test_that("isogram with duplicated non letter character", {
|
35
|
+
word <- "Hjelmqvist-Gryb-Zock-Pfund-Wax"
|
36
|
+
expect_equal(is_isogram(word), TRUE)
|
37
|
+
})
|
38
|
+
|
39
|
+
test_that("made-up name that is an isogram", {
|
40
|
+
word <- "Emily Jung Schwartzkopf"
|
41
|
+
expect_equal(is_isogram(word), TRUE)
|
42
|
+
})
|
43
|
+
|
44
|
+
print("All tests passed!")
|
@@ -0,0 +1,22 @@
|
|
1
|
+
largestSeriesProduct <- function(digits, span){
|
2
|
+
|
3
|
+
nums <- as.numeric(unlist(strsplit(digits, "")))
|
4
|
+
|
5
|
+
if (any(is.na(nums)) || span < 0 || span > length(nums)) {
|
6
|
+
stop("Non-numeric characters or span less than digit length")
|
7
|
+
}
|
8
|
+
|
9
|
+
if (span == 0) {
|
10
|
+
return (1)
|
11
|
+
}
|
12
|
+
|
13
|
+
indices <- 1:(length(nums)-span+1)
|
14
|
+
|
15
|
+
get_prod <- function(index, nums, span) {
|
16
|
+
prod(nums[index:(index+span-1)])
|
17
|
+
}
|
18
|
+
|
19
|
+
products <- sapply(indices, FUN = get_prod, nums, span)
|
20
|
+
|
21
|
+
max(products)
|
22
|
+
}
|
@@ -0,0 +1,110 @@
|
|
1
|
+
source('./largest-series-product.R')
|
2
|
+
library(testthat)
|
3
|
+
|
4
|
+
test_that("finds the largest product if span equals length", {
|
5
|
+
digits <- "29"
|
6
|
+
span <- 2
|
7
|
+
expect_equal(largestSeriesProduct(digits, span), 18)
|
8
|
+
})
|
9
|
+
|
10
|
+
test_that("can find the largest product of 2 with numbers in order", {
|
11
|
+
digits <- "0123456789"
|
12
|
+
span <- 2
|
13
|
+
expect_equal(largestSeriesProduct(digits, span), 72)
|
14
|
+
})
|
15
|
+
|
16
|
+
test_that("can find the largest product of 2", {
|
17
|
+
digits <- "576802143"
|
18
|
+
span <- 2
|
19
|
+
expect_equal(largestSeriesProduct(digits, span), 48)
|
20
|
+
})
|
21
|
+
|
22
|
+
test_that("can find the largest product of 3 with numbers in order", {
|
23
|
+
digits <- "0123456789"
|
24
|
+
span <- 3
|
25
|
+
expect_equal(largestSeriesProduct(digits, span), 504)
|
26
|
+
})
|
27
|
+
|
28
|
+
test_that("can find the largest product of 3", {
|
29
|
+
digits <- "1027839564"
|
30
|
+
span <- 3
|
31
|
+
expect_equal(largestSeriesProduct(digits, span), 270)
|
32
|
+
})
|
33
|
+
|
34
|
+
test_that("can find the largest product of 5 with numbers in order", {
|
35
|
+
digits <- "0123456789"
|
36
|
+
span <- 5
|
37
|
+
expect_equal(largestSeriesProduct(digits, span), 15120)
|
38
|
+
})
|
39
|
+
|
40
|
+
test_that("can get the largest product of a big number", {
|
41
|
+
digits <- "73167176531330624919225119674426574742355349194934"
|
42
|
+
span <- 6
|
43
|
+
expect_equal(largestSeriesProduct(digits, span), 23520)
|
44
|
+
})
|
45
|
+
|
46
|
+
test_that("reports zero if the only digits are zero", {
|
47
|
+
digits <- "0000"
|
48
|
+
span <- 2
|
49
|
+
expect_equal(largestSeriesProduct(digits, span), 0)
|
50
|
+
})
|
51
|
+
|
52
|
+
test_that("reports zero if all spans include zero", {
|
53
|
+
digits <- "99099"
|
54
|
+
span <- 3
|
55
|
+
expect_equal(largestSeriesProduct(digits, span), 0)
|
56
|
+
})
|
57
|
+
|
58
|
+
test_that("rejects span longer than string length", {
|
59
|
+
digits <- "123"
|
60
|
+
span <- 4
|
61
|
+
expect_error(largestSeriesProduct(digits, span))
|
62
|
+
})
|
63
|
+
|
64
|
+
# There may be some confusion about whether this should be 1 or error.
|
65
|
+
# The reasoning for it being 1 is this:
|
66
|
+
# There is one 0-character string contained in the empty string.
|
67
|
+
# That's the empty string itself.
|
68
|
+
# The empty product is 1 (the identity for multiplication).
|
69
|
+
# Therefore LSP('', 0) is 1.
|
70
|
+
# It's NOT the case that LSP('', 0) takes max of an empty list.
|
71
|
+
# So there is no error.
|
72
|
+
# Compare against LSP('123', 4):
|
73
|
+
# There are zero 4-character strings in '123'.
|
74
|
+
# So LSP('123', 4) really DOES take the max of an empty list.
|
75
|
+
# So LSP('123', 4) errors and LSP('', 0) does NOT.
|
76
|
+
|
77
|
+
test_that("reports 1 for empty string and empty product (0 span)", {
|
78
|
+
digits <- ""
|
79
|
+
span <- 0
|
80
|
+
expect_equal(largestSeriesProduct(digits, span), 1)
|
81
|
+
})
|
82
|
+
|
83
|
+
# As above, there is one 0-character string in '123'.
|
84
|
+
# So again no error. It's the empty product, 1.
|
85
|
+
|
86
|
+
test_that("reports 1 for nonempty string and empty product (0 span)", {
|
87
|
+
digits <- "123"
|
88
|
+
span <- 0
|
89
|
+
expect_equal(largestSeriesProduct(digits, span), 1)
|
90
|
+
})
|
91
|
+
|
92
|
+
test_that("rejects empty string and nonzero span", {
|
93
|
+
digits <- ""
|
94
|
+
span <- 1
|
95
|
+
expect_error(largestSeriesProduct(digits, span))
|
96
|
+
})
|
97
|
+
|
98
|
+
test_that("rejects invalid character in digits", {
|
99
|
+
digits <- "1234a5"
|
100
|
+
span <- 2
|
101
|
+
expect_error(largestSeriesProduct(digits, span))
|
102
|
+
})
|
103
|
+
|
104
|
+
test_that("rejects negative span", {
|
105
|
+
digits <- "12345"
|
106
|
+
span <- -1
|
107
|
+
expect_error(largestSeriesProduct(digits, span))
|
108
|
+
})
|
109
|
+
|
110
|
+
print("All tests passed!")
|
@@ -0,0 +1,27 @@
|
|
1
|
+
pascalsTriangle <- function(n) {
|
2
|
+
|
3
|
+
if (n == 0) {
|
4
|
+
return (list())
|
5
|
+
}
|
6
|
+
else if (n == 1) {
|
7
|
+
return (list(1))
|
8
|
+
}
|
9
|
+
else if (n == 2) {
|
10
|
+
return (list(1, c(1,1)))
|
11
|
+
}
|
12
|
+
else if (n >= 3) {
|
13
|
+
triangle <- list(1, c(1,1))
|
14
|
+
for (x in 3:n) {
|
15
|
+
row <- rep(1, x)
|
16
|
+
for (i in 2:(x-1)) {
|
17
|
+
row[i] = sum(triangle[[x-1]][(i-1):i])
|
18
|
+
}
|
19
|
+
triangle[[x]] = row
|
20
|
+
}
|
21
|
+
return (triangle)
|
22
|
+
}
|
23
|
+
else {
|
24
|
+
stop("argument n needs to be an integer")
|
25
|
+
}
|
26
|
+
|
27
|
+
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
source('./pascals-triangle.R')
|
2
|
+
library(testthat)
|
3
|
+
|
4
|
+
test_that("zero rows", {
|
5
|
+
expect_equal(pascalsTriangle(0), list())
|
6
|
+
})
|
7
|
+
|
8
|
+
test_that("single row", {
|
9
|
+
expect_equal(pascalsTriangle(1), list(1))
|
10
|
+
})
|
11
|
+
|
12
|
+
test_that("two rows", {
|
13
|
+
expect_equal(pascalsTriangle(2), list(1, c(1, 1)))
|
14
|
+
})
|
15
|
+
|
16
|
+
test_that("three rows", {
|
17
|
+
expect_equal(pascalsTriangle(3), list(1, c(1, 1), c(1, 2, 1)))
|
18
|
+
})
|
19
|
+
|
20
|
+
test_that("four rows", {
|
21
|
+
expect_equal(pascalsTriangle(4), list(1, c(1, 1), c(1, 2, 1), c(1, 3, 3, 1)))
|
22
|
+
})
|
23
|
+
|
24
|
+
test_that("negative rows", {
|
25
|
+
expect_error(pascalsTriangle(-1))
|
26
|
+
})
|
27
|
+
|
28
|
+
test_that("null/no rows", {
|
29
|
+
expect_error(pascalsTriangle(NULL))
|
30
|
+
})
|
31
|
+
|
32
|
+
print("All tests passed!")
|
@@ -0,0 +1,22 @@
|
|
1
|
+
isPerfect <- function(n){
|
2
|
+
|
3
|
+
findFactors <- function(n) {
|
4
|
+
factors <- c()
|
5
|
+
for (i in 2:floor(n^0.5 + 1)) {
|
6
|
+
|
7
|
+
if (n %% i == 0) {
|
8
|
+
if (i^2 != n) {
|
9
|
+
factors <- c(factors, i, n / i)
|
10
|
+
}
|
11
|
+
else {
|
12
|
+
factors <- c(factors, i)
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
16
|
+
}
|
17
|
+
unique(factors)
|
18
|
+
}
|
19
|
+
|
20
|
+
sum(findFactors(n)) + 1 == n
|
21
|
+
|
22
|
+
}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
source('./perfect-number.R')
|
2
|
+
library(testthat)
|
3
|
+
|
4
|
+
test_that("first perfect number", {
|
5
|
+
n <- 6
|
6
|
+
expect_equal(isPerfect(n), TRUE)
|
7
|
+
})
|
8
|
+
|
9
|
+
test_that("no perfect number", {
|
10
|
+
n <- 8
|
11
|
+
expect_equal(isPerfect(n), FALSE)
|
12
|
+
})
|
13
|
+
|
14
|
+
test_that("second perfect number", {
|
15
|
+
n <- 28
|
16
|
+
expect_equal(isPerfect(n), TRUE)
|
17
|
+
})
|
18
|
+
|
19
|
+
test_that("abundant", {
|
20
|
+
n <- 20
|
21
|
+
expect_equal(isPerfect(n), FALSE)
|
22
|
+
})
|
23
|
+
|
24
|
+
test_that("answer to the ultimate question of life", {
|
25
|
+
n <- 42
|
26
|
+
expect_equal(isPerfect(n), FALSE)
|
27
|
+
})
|
28
|
+
|
29
|
+
test_that("third perfect number", {
|
30
|
+
n <- 496
|
31
|
+
expect_equal(isPerfect(n), TRUE)
|
32
|
+
})
|
33
|
+
|
34
|
+
test_that("odd abundant", {
|
35
|
+
n <- 945
|
36
|
+
expect_equal(isPerfect(n), FALSE)
|
37
|
+
})
|
38
|
+
|
39
|
+
test_that("fourth perfect number", {
|
40
|
+
n <- 8128
|
41
|
+
expect_equal(isPerfect(n), TRUE)
|
42
|
+
})
|
43
|
+
|
44
|
+
test_that("fifth perfect number", {
|
45
|
+
n <- 33550336
|
46
|
+
expect_equal(isPerfect(n), TRUE)
|
47
|
+
})
|
48
|
+
|
49
|
+
test_that("sixth perfect number", {
|
50
|
+
n <- 8589869056
|
51
|
+
expect_equal(isPerfect(n), TRUE)
|
52
|
+
})
|
53
|
+
|
54
|
+
test_that("seventh perfect number", {
|
55
|
+
n <- 137438691328
|
56
|
+
expect_equal(isPerfect(n), TRUE)
|
57
|
+
})
|
58
|
+
|
59
|
+
print("All tests passed!")
|
@@ -0,0 +1,14 @@
|
|
1
|
+
prime_factors <- function(number) {
|
2
|
+
factors <- c()
|
3
|
+
lowest.factor = 2
|
4
|
+
while (number > 1) {
|
5
|
+
if (number %% lowest.factor == 0) {
|
6
|
+
number <- number / lowest.factor
|
7
|
+
factors[length(factors) + 1] = lowest.factor
|
8
|
+
}
|
9
|
+
else {
|
10
|
+
lowest.factor <- lowest.factor + 1
|
11
|
+
}
|
12
|
+
}
|
13
|
+
return(factors)
|
14
|
+
}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
source('./prime-factors.R')
|
2
|
+
suppressPackageStartupMessages({ library(testthat) })
|
3
|
+
|
4
|
+
test_that("no factors", {
|
5
|
+
number <- 1
|
6
|
+
expect_equal(prime_factors(number),
|
7
|
+
c()
|
8
|
+
)
|
9
|
+
})
|
10
|
+
|
11
|
+
test_that("prime number", {
|
12
|
+
number <- 2
|
13
|
+
expect_equal(prime_factors(number),
|
14
|
+
c(2)
|
15
|
+
)
|
16
|
+
})
|
17
|
+
|
18
|
+
test_that("square of a prime", {
|
19
|
+
number <- 9
|
20
|
+
expect_equal(prime_factors(number),
|
21
|
+
c(3, 3)
|
22
|
+
)
|
23
|
+
})
|
24
|
+
|
25
|
+
test_that("cube of a prime", {
|
26
|
+
number <- 8
|
27
|
+
expect_equal(prime_factors(number),
|
28
|
+
c(2, 2, 2)
|
29
|
+
)
|
30
|
+
})
|
31
|
+
|
32
|
+
test_that("product of primes and non-primes", {
|
33
|
+
number <- 12
|
34
|
+
expect_equal(prime_factors(number),
|
35
|
+
c(2, 2, 3)
|
36
|
+
)
|
37
|
+
})
|
38
|
+
|
39
|
+
test_that("product of primes", {
|
40
|
+
number <- 901255
|
41
|
+
expect_equal(prime_factors(number),
|
42
|
+
c(5, 17, 23, 461)
|
43
|
+
)
|
44
|
+
})
|
45
|
+
test_that("factors include a large prime", {
|
46
|
+
number <- 93819012551
|
47
|
+
expect_equal(prime_factors(number),
|
48
|
+
c(11, 9539, 894119)
|
49
|
+
)
|
50
|
+
})
|
@@ -0,0 +1,14 @@
|
|
1
|
+
to_rna <- function(dna) {
|
2
|
+
|
3
|
+
dna_to_rna <- list(G="C", C="G", T="A", A="U")
|
4
|
+
|
5
|
+
func <- function(x) {
|
6
|
+
if (!(x %in% c("G","C","T","A"))) {
|
7
|
+
stop("invalid dna strand")
|
8
|
+
}
|
9
|
+
dna_to_rna[[x]]
|
10
|
+
}
|
11
|
+
|
12
|
+
paste(lapply(strsplit(dna, "")[[1]], FUN=func), collapse = "")
|
13
|
+
|
14
|
+
}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
source('./rna-transcription.R')
|
2
|
+
library(testthat)
|
3
|
+
|
4
|
+
test_that("rna complement of cytosine is guanine", {
|
5
|
+
dna <- "C"
|
6
|
+
expect_equal(to_rna(dna), "G")
|
7
|
+
})
|
8
|
+
|
9
|
+
test_that("rna complement of guanine is cytosine", {
|
10
|
+
dna <- "G"
|
11
|
+
expect_equal(to_rna(dna), "C")
|
12
|
+
})
|
13
|
+
|
14
|
+
test_that("rna complement of thymine is adenine", {
|
15
|
+
dna <- "T"
|
16
|
+
expect_equal(to_rna(dna), "A")
|
17
|
+
})
|
18
|
+
|
19
|
+
test_that("rna complement of adenine is uracil", {
|
20
|
+
dna <- "A"
|
21
|
+
expect_equal(to_rna(dna), "U")
|
22
|
+
})
|
23
|
+
|
24
|
+
test_that("rna complement", {
|
25
|
+
dna <- "ACGTGGTCTTAA"
|
26
|
+
expect_equal(to_rna(dna), "UGCACCAGAAUU")
|
27
|
+
})
|
28
|
+
|
29
|
+
test_that("dna correctly handles invalid input", {
|
30
|
+
dna <- "U"
|
31
|
+
expect_error(to_rna(dna))
|
32
|
+
})
|
33
|
+
|
34
|
+
test_that("dna correctly handles completely invalid input", {
|
35
|
+
dna <- "XXX"
|
36
|
+
expect_error(to_rna(dna))
|
37
|
+
})
|
38
|
+
|
39
|
+
test_that("dna correctly handles partially invalid input", {
|
40
|
+
dna <- "ACGTXXXCTTAA"
|
41
|
+
expect_error(to_rna(dna))
|
42
|
+
})
|
43
|
+
|
44
|
+
print("All tests passed!")
|
@@ -0,0 +1,22 @@
|
|
1
|
+
rotate <- function(text, key) {
|
2
|
+
|
3
|
+
# Split string into character vector
|
4
|
+
textVector <- unlist(strsplit(text, ""))
|
5
|
+
|
6
|
+
# Record which characters are upper case
|
7
|
+
upperCase <- toupper(textVector) == textVector
|
8
|
+
|
9
|
+
# Rotate letter characters
|
10
|
+
rotationIndex <- (match(tolower(textVector), letters)+key-1) %% 26 + 1
|
11
|
+
rotatedVector <- letters[rotationIndex]
|
12
|
+
|
13
|
+
# Restore non-letter characters in rotated character vector
|
14
|
+
rotatedVector[is.na(rotatedVector)] <- textVector[is.na(rotatedVector)]
|
15
|
+
|
16
|
+
# Restore upper case characters
|
17
|
+
rotatedVector[upperCase] <- toupper(rotatedVector[upperCase])
|
18
|
+
|
19
|
+
# Collapse character vector into string
|
20
|
+
paste(rotatedVector, collapse = "")
|
21
|
+
|
22
|
+
}
|
@@ -0,0 +1,64 @@
|
|
1
|
+
source('./rotational-cipher.R')
|
2
|
+
library(testthat)
|
3
|
+
|
4
|
+
test_that("rotate a by 1", {
|
5
|
+
text <- "a"
|
6
|
+
key <- 1
|
7
|
+
expect_equal(rotate(text, key), "b")
|
8
|
+
})
|
9
|
+
|
10
|
+
test_that("rotate a by 26, same output as input", {
|
11
|
+
text <- "a"
|
12
|
+
key <- 26
|
13
|
+
expect_equal(rotate(text, key), "a")
|
14
|
+
})
|
15
|
+
|
16
|
+
test_that("rotate a by 0, same output as input", {
|
17
|
+
text <- "a"
|
18
|
+
key <- 0
|
19
|
+
expect_equal(rotate(text, key), "a")
|
20
|
+
})
|
21
|
+
|
22
|
+
test_that("rotate m by 13", {
|
23
|
+
text <- "m"
|
24
|
+
key <- 13
|
25
|
+
expect_equal(rotate(text, key), "z")
|
26
|
+
})
|
27
|
+
|
28
|
+
test_that("rotate n by 13 with wrap around alphabet", {
|
29
|
+
text <- "n"
|
30
|
+
key <- 13
|
31
|
+
expect_equal(rotate(text, key), "a")
|
32
|
+
})
|
33
|
+
|
34
|
+
test_that("rotate capital letters", {
|
35
|
+
text <- "OMG"
|
36
|
+
key <- 5
|
37
|
+
expect_equal(rotate(text, key), "TRL")
|
38
|
+
})
|
39
|
+
|
40
|
+
test_that("rotate spaces", {
|
41
|
+
text <- "O M G"
|
42
|
+
key <- 5
|
43
|
+
expect_equal(rotate(text, key), "T R L")
|
44
|
+
})
|
45
|
+
|
46
|
+
test_that("rotate numbers", {
|
47
|
+
text <- "Testing 1 2 3 testing"
|
48
|
+
key <- 4
|
49
|
+
expect_equal(rotate(text, key), "Xiwxmrk 1 2 3 xiwxmrk")
|
50
|
+
})
|
51
|
+
|
52
|
+
test_that("rotate punctuation", {
|
53
|
+
text <- "Let's eat, Grandma!"
|
54
|
+
key <- 21
|
55
|
+
expect_equal(rotate(text, key), "Gzo'n zvo, Bmviyhv!")
|
56
|
+
})
|
57
|
+
|
58
|
+
test_that("rotate all letters", {
|
59
|
+
text <- "The quick brown fox jumps over the lazy dog."
|
60
|
+
key <- 13
|
61
|
+
expect_equal(rotate(text, key), "Gur dhvpx oebja sbk whzcf bire gur ynml qbt.")
|
62
|
+
})
|
63
|
+
|
64
|
+
print("All tests passed!")
|
@@ -0,0 +1,19 @@
|
|
1
|
+
scrabbleScore <- function(input){
|
2
|
+
|
3
|
+
# Letter Value
|
4
|
+
# A, E, I, O, U, L, N, R, S, T 1
|
5
|
+
# D, G 2
|
6
|
+
# B, C, M, P 3
|
7
|
+
# F, H, V, W, Y 4
|
8
|
+
# K 5
|
9
|
+
# J, X 8
|
10
|
+
# Q, Z 10
|
11
|
+
|
12
|
+
letterScore <- c(1,3,3,2,1,4,2,4,1,8,5,1,3,1,1,3,10,1,1,1,1,4,4,8,4,10)
|
13
|
+
names(letterScore) <- LETTERS
|
14
|
+
|
15
|
+
chars <- unlist(strsplit(input, ""))
|
16
|
+
|
17
|
+
sum(letterScore[toupper(chars)])
|
18
|
+
|
19
|
+
}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
source('./scrabble-score.R')
|
2
|
+
library(testthat)
|
3
|
+
|
4
|
+
test_that("lowercase letter", {
|
5
|
+
input <- "a"
|
6
|
+
expect_equal(scrabbleScore(input), 1)
|
7
|
+
})
|
8
|
+
|
9
|
+
test_that("uppercase letter", {
|
10
|
+
input <- "A"
|
11
|
+
expect_equal(scrabbleScore(input), 1)
|
12
|
+
})
|
13
|
+
|
14
|
+
test_that("valuable letter", {
|
15
|
+
input <- "f"
|
16
|
+
expect_equal(scrabbleScore(input), 4)
|
17
|
+
})
|
18
|
+
|
19
|
+
test_that("short word", {
|
20
|
+
input <- "at"
|
21
|
+
expect_equal(scrabbleScore(input), 2)
|
22
|
+
})
|
23
|
+
|
24
|
+
test_that("short, valuable word", {
|
25
|
+
input <- "zoo"
|
26
|
+
expect_equal(scrabbleScore(input), 12)
|
27
|
+
})
|
28
|
+
|
29
|
+
test_that("medium word", {
|
30
|
+
input <- "street"
|
31
|
+
expect_equal(scrabbleScore(input), 6)
|
32
|
+
})
|
33
|
+
|
34
|
+
test_that("medium, valuable word", {
|
35
|
+
input <- "quirky"
|
36
|
+
expect_equal(scrabbleScore(input), 22)
|
37
|
+
})
|
38
|
+
|
39
|
+
test_that("long, mixed-case word", {
|
40
|
+
input <- "OxyphenButazone"
|
41
|
+
expect_equal(scrabbleScore(input), 41)
|
42
|
+
})
|
43
|
+
|
44
|
+
test_that("english-like word", {
|
45
|
+
input <- "pinata"
|
46
|
+
expect_equal(scrabbleScore(input), 8)
|
47
|
+
})
|
48
|
+
|
49
|
+
test_that("empty input", {
|
50
|
+
input <- ""
|
51
|
+
expect_equal(scrabbleScore(input), 0)
|
52
|
+
})
|
53
|
+
|
54
|
+
test_that("entire alphabet available", {
|
55
|
+
input <- "abcdefghijklmnopqrstuvwxyz"
|
56
|
+
expect_equal(scrabbleScore(input), 87)
|
57
|
+
})
|
58
|
+
|
59
|
+
print("All tests passed!")
|
@@ -0,0 +1,35 @@
|
|
1
|
+
tournament <- function(input) {
|
2
|
+
|
3
|
+
results <- data.frame(Team = "tempTeam", MP = 0, W = 0, D = 0, L = 0, P = 0)
|
4
|
+
|
5
|
+
for (item in input) {
|
6
|
+
|
7
|
+
match <- unlist(strsplit(item, ";"))
|
8
|
+
# Check that match result is valid
|
9
|
+
if (length(match) != 3 || !(match[3] %in% c("draw", "win", "loss"))) {
|
10
|
+
next
|
11
|
+
}
|
12
|
+
else {
|
13
|
+
# Process result
|
14
|
+
if (match[3]=="draw") {
|
15
|
+
results <- rbind(results, c(match[1], 1, 0, 1, 0, 1), c(match[2], 1, 0, 1, 0, 1))
|
16
|
+
} else if (match[3]=="win") {
|
17
|
+
results <- rbind(results, c(match[1], 1, 1, 0, 0, 3), c(match[2], 1, 0, 0, 1, 0))
|
18
|
+
} else {
|
19
|
+
results <- rbind(results, c(match[2], 1, 1, 0, 0, 3), c(match[1], 1, 0, 0, 1, 0))
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
}
|
24
|
+
results$MP <- as.numeric(results$MP)
|
25
|
+
results$W <- as.numeric(results$W)
|
26
|
+
results$D <- as.numeric(results$D)
|
27
|
+
results$L <- as.numeric(results$L)
|
28
|
+
results$P <- as.numeric(results$P)
|
29
|
+
|
30
|
+
output <- aggregate(.~Team, results[-1,], sum)
|
31
|
+
output <- output[order(-output$P,output$Team), ]
|
32
|
+
row.names(output) <- 1:nrow(output)
|
33
|
+
output
|
34
|
+
|
35
|
+
}
|
@@ -0,0 +1,140 @@
|
|
1
|
+
source('./tournament.R')
|
2
|
+
library(testthat)
|
3
|
+
|
4
|
+
options(stringsAsFactors = FALSE)
|
5
|
+
|
6
|
+
test_that("typical input", {
|
7
|
+
input <- c("Allegoric Alaskans;Blithering Badgers;win",
|
8
|
+
"Devastating Donkeys;Courageous Californians;draw",
|
9
|
+
"Devastating Donkeys;Allegoric Alaskans;win",
|
10
|
+
"Courageous Californians;Blithering Badgers;loss",
|
11
|
+
"Blithering Badgers;Devastating Donkeys;loss",
|
12
|
+
"Allegoric Alaskans;Courageous Californians;win")
|
13
|
+
expect_equal(tournament(input),
|
14
|
+
data.frame(
|
15
|
+
Team = c("Devastating Donkeys","Allegoric Alaskans",
|
16
|
+
"Blithering Badgers","Courageous Californians"),
|
17
|
+
MP = c(3, 3, 3, 3),
|
18
|
+
W = c(2, 2, 1, 0),
|
19
|
+
D = c(1, 0, 0, 1),
|
20
|
+
L = c(0, 1, 2, 2),
|
21
|
+
P = c(7, 6, 3, 1)
|
22
|
+
)
|
23
|
+
)
|
24
|
+
})
|
25
|
+
|
26
|
+
test_that("incomplete competition (not all pairs have played)", {
|
27
|
+
input <- c("Allegoric Alaskans;Blithering Badgers;loss",
|
28
|
+
"Devastating Donkeys;Allegoric Alaskans;loss",
|
29
|
+
"Courageous Californians;Blithering Badgers;draw",
|
30
|
+
"Allegoric Alaskans;Courageous Californians;win")
|
31
|
+
expect_equal(tournament(input),
|
32
|
+
data.frame(
|
33
|
+
Team = c("Allegoric Alaskans","Blithering Badgers",
|
34
|
+
"Courageous Californians","Devastating Donkeys"),
|
35
|
+
MP = c(3, 2, 2, 1),
|
36
|
+
W = c(2, 1, 0, 0),
|
37
|
+
D = c(0, 1, 1, 0),
|
38
|
+
L = c(1, 0, 1, 1),
|
39
|
+
P = c(6, 4, 1, 0)
|
40
|
+
)
|
41
|
+
)
|
42
|
+
})
|
43
|
+
|
44
|
+
test_that("ties broken alphabetically", {
|
45
|
+
input <- c("Courageous Californians;Devastating Donkeys;win",
|
46
|
+
"Allegoric Alaskans;Blithering Badgers;win",
|
47
|
+
"Devastating Donkeys;Allegoric Alaskans;loss",
|
48
|
+
"Courageous Californians;Blithering Badgers;win",
|
49
|
+
"Blithering Badgers;Devastating Donkeys;draw",
|
50
|
+
"Allegoric Alaskans;Courageous Californians;draw")
|
51
|
+
expect_equal(tournament(input),
|
52
|
+
data.frame(
|
53
|
+
Team = c("Allegoric Alaskans","Courageous Californians",
|
54
|
+
"Blithering Badgers","Devastating Donkeys"),
|
55
|
+
MP = c(3, 3, 3, 3),
|
56
|
+
W = c(2, 2, 0, 0),
|
57
|
+
D = c(1, 1, 1, 1),
|
58
|
+
L = c(0, 0, 2, 2),
|
59
|
+
P = c(7, 7, 1, 1)
|
60
|
+
)
|
61
|
+
)
|
62
|
+
})
|
63
|
+
|
64
|
+
test_that("an empty line", {
|
65
|
+
input <- c("Allegoric Alaskans;Blithering Badgers;loss",
|
66
|
+
"Devastating Donkeys;Allegoric Alaskans;loss",
|
67
|
+
"",
|
68
|
+
"Courageous Californians;Blithering Badgers;draw",
|
69
|
+
"Allegoric Alaskans;Courageous Californians;win")
|
70
|
+
expect_equal(tournament(input),
|
71
|
+
data.frame(
|
72
|
+
Team = c("Allegoric Alaskans","Blithering Badgers",
|
73
|
+
"Courageous Californians","Devastating Donkeys"),
|
74
|
+
MP = c(3, 2, 2, 1),
|
75
|
+
W = c(2, 1, 0, 0),
|
76
|
+
D = c(0, 1, 1, 0),
|
77
|
+
L = c(1, 0, 1, 1),
|
78
|
+
P = c(6, 4, 1, 0)
|
79
|
+
)
|
80
|
+
)
|
81
|
+
})
|
82
|
+
|
83
|
+
test_that("wrong separator used", {
|
84
|
+
input <- c("Allegoric Alaskans;Blithering Badgers;loss",
|
85
|
+
"Devastating Donkeys;Allegoric Alaskans;loss",
|
86
|
+
"Courageous Californians;Blithering Badgers;draw",
|
87
|
+
"Devastating Donkeys@Courageous Californians;draw",
|
88
|
+
"Allegoric Alaskans;Courageous Californians;win")
|
89
|
+
expect_equal(tournament(input),
|
90
|
+
data.frame(
|
91
|
+
Team = c("Allegoric Alaskans","Blithering Badgers",
|
92
|
+
"Courageous Californians","Devastating Donkeys"),
|
93
|
+
MP = c(3, 2, 2, 1),
|
94
|
+
W = c(2, 1, 0, 0),
|
95
|
+
D = c(0, 1, 1, 0),
|
96
|
+
L = c(1, 0, 1, 1),
|
97
|
+
P = c(6, 4, 1, 0)
|
98
|
+
)
|
99
|
+
)
|
100
|
+
})
|
101
|
+
|
102
|
+
test_that("too many separators", {
|
103
|
+
input <- c("Allegoric Alaskans;Blithering Badgers;loss",
|
104
|
+
"Devastating Donkeys;Courageous Californians;draw;5",
|
105
|
+
"Devastating Donkeys;Allegoric Alaskans;loss",
|
106
|
+
"Courageous Californians;Blithering Badgers;draw",
|
107
|
+
"Allegoric Alaskans;Courageous Californians;win")
|
108
|
+
expect_equal(tournament(input),
|
109
|
+
data.frame(
|
110
|
+
Team = c("Allegoric Alaskans","Blithering Badgers",
|
111
|
+
"Courageous Californians","Devastating Donkeys"),
|
112
|
+
MP = c(3, 2, 2, 1),
|
113
|
+
W = c(2, 1, 0, 0),
|
114
|
+
D = c(0, 1, 1, 0),
|
115
|
+
L = c(1, 0, 1, 1),
|
116
|
+
P = c(6, 4, 1, 0)
|
117
|
+
)
|
118
|
+
)
|
119
|
+
})
|
120
|
+
|
121
|
+
test_that("invalid match result", {
|
122
|
+
input <- c("Allegoric Alaskans;Blithering Badgers;loss",
|
123
|
+
"Devastating Donkeys;Allegoric Alaskans;loss",
|
124
|
+
"Courageous Californians;Blithering Badgers;draw",
|
125
|
+
"Allegoric Alaskans;Courageous Californians;win",
|
126
|
+
"Devastating Donkeys;Allegoric Alaskans;dra")
|
127
|
+
expect_equal(tournament(input),
|
128
|
+
data.frame(
|
129
|
+
Team = c("Allegoric Alaskans","Blithering Badgers",
|
130
|
+
"Courageous Californians","Devastating Donkeys"),
|
131
|
+
MP = c(3, 2, 2, 1),
|
132
|
+
W = c(2, 1, 0, 0),
|
133
|
+
D = c(0, 1, 1, 0),
|
134
|
+
L = c(1, 0, 1, 1),
|
135
|
+
P = c(6, 4, 1, 0)
|
136
|
+
)
|
137
|
+
)
|
138
|
+
})
|
139
|
+
|
140
|
+
print("All tests passed!")
|
@@ -1,5 +1,5 @@
|
|
1
1
|
source('./word-count.R')
|
2
|
-
|
2
|
+
library(testthat)
|
3
3
|
|
4
4
|
# When comparing lists, all.equal expects the objects to be in the same order
|
5
5
|
# This expectation instead checks that a) the set of names are the same and b) each named object is equal
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trackler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.8.
|
4
|
+
version: 2.0.8.38
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Katrina Owen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|
@@ -6860,18 +6860,42 @@ files:
|
|
6860
6860
|
- tracks/r/exercises/hello-world/example.R
|
6861
6861
|
- tracks/r/exercises/hello-world/hello-world.R
|
6862
6862
|
- tracks/r/exercises/hello-world/test_hello-world.R
|
6863
|
+
- tracks/r/exercises/isogram/example.R
|
6864
|
+
- tracks/r/exercises/isogram/isogram.R
|
6865
|
+
- tracks/r/exercises/isogram/test_isogram.R
|
6866
|
+
- tracks/r/exercises/largest-series-product/example.R
|
6867
|
+
- tracks/r/exercises/largest-series-product/largest-series-product.R
|
6868
|
+
- tracks/r/exercises/largest-series-product/test_largest-series-product.R
|
6863
6869
|
- tracks/r/exercises/leap/example.R
|
6864
6870
|
- tracks/r/exercises/leap/leap.R
|
6865
6871
|
- tracks/r/exercises/leap/test_leap.R
|
6866
6872
|
- tracks/r/exercises/luhn/example.R
|
6867
6873
|
- tracks/r/exercises/luhn/luhn.R
|
6868
6874
|
- tracks/r/exercises/luhn/test_luhn.R
|
6875
|
+
- tracks/r/exercises/pascals-triangle/example.R
|
6876
|
+
- tracks/r/exercises/pascals-triangle/pascals-triangle.R
|
6877
|
+
- tracks/r/exercises/pascals-triangle/test_pascals-triangle.R
|
6878
|
+
- tracks/r/exercises/perfect-numbers/example.R
|
6879
|
+
- tracks/r/exercises/perfect-numbers/perfect-numbers.R
|
6880
|
+
- tracks/r/exercises/perfect-numbers/test_perfect-numbers.R
|
6869
6881
|
- tracks/r/exercises/phone-number/example.R
|
6870
6882
|
- tracks/r/exercises/phone-number/phone-number.R
|
6871
6883
|
- tracks/r/exercises/phone-number/test_phone-number.R
|
6884
|
+
- tracks/r/exercises/prime-factors/example.R
|
6885
|
+
- tracks/r/exercises/prime-factors/prime-factors.R
|
6886
|
+
- tracks/r/exercises/prime-factors/test_prime-factors.R
|
6872
6887
|
- tracks/r/exercises/raindrops/example.R
|
6873
6888
|
- tracks/r/exercises/raindrops/raindrops.R
|
6874
6889
|
- tracks/r/exercises/raindrops/test_raindrops.R
|
6890
|
+
- tracks/r/exercises/rna-transcription/example.R
|
6891
|
+
- tracks/r/exercises/rna-transcription/rna-transcription.R
|
6892
|
+
- tracks/r/exercises/rna-transcription/test_rna-transcription.R
|
6893
|
+
- tracks/r/exercises/rotational-cipher/example.R
|
6894
|
+
- tracks/r/exercises/rotational-cipher/rotational-cipher.R
|
6895
|
+
- tracks/r/exercises/rotational-cipher/test_rotational-cipher.R
|
6896
|
+
- tracks/r/exercises/scrabble-score/example.R
|
6897
|
+
- tracks/r/exercises/scrabble-score/scrabble-score.R
|
6898
|
+
- tracks/r/exercises/scrabble-score/test_scrabble-score.R
|
6875
6899
|
- tracks/r/exercises/secret-handshake/example.R
|
6876
6900
|
- tracks/r/exercises/secret-handshake/secret-handshake.R
|
6877
6901
|
- tracks/r/exercises/secret-handshake/test_secret-handshake.R
|
@@ -6884,6 +6908,9 @@ files:
|
|
6884
6908
|
- tracks/r/exercises/sum-of-multiples/example.R
|
6885
6909
|
- tracks/r/exercises/sum-of-multiples/sum-of-multiples.R
|
6886
6910
|
- tracks/r/exercises/sum-of-multiples/test_sum-of-multiples.R
|
6911
|
+
- tracks/r/exercises/tournament/example.R
|
6912
|
+
- tracks/r/exercises/tournament/test_tournament.R
|
6913
|
+
- tracks/r/exercises/tournament/tournament.R
|
6887
6914
|
- tracks/r/exercises/word-count/example.R
|
6888
6915
|
- tracks/r/exercises/word-count/test_word-count.R
|
6889
6916
|
- tracks/r/exercises/word-count/word-count.R
|