Skip to content

Commit 61d2074

Browse files
flower-field replaces minesweeper
1 parent b30cf8a commit 61d2074

8 files changed

Lines changed: 392 additions & 50 deletions

File tree

config.json

Lines changed: 77 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@
3737
"concept": [
3838
{
3939
"slug": "lucians-luscious-lasagna",
40-
"name": "Lucian's Luscious Lasagna",
4140
"uuid": "29a2d3bd-eec8-454d-9dba-4b2d7d071925",
41+
"name": "Lucian's Luscious Lasagna",
42+
"difficulty": 1,
4243
"concepts": [
4344
"functions"
4445
],
@@ -47,8 +48,9 @@
4748
},
4849
{
4950
"slug": "magazine-cutout",
50-
"name": "Magazine Cutout",
5151
"uuid": "091c141b-6b68-43ad-b009-a27cd6741906",
52+
"name": "Magazine Cutout",
53+
"difficulty": 1,
5254
"concepts": [
5355
"entry-api"
5456
],
@@ -60,8 +62,9 @@
6062
},
6163
{
6264
"slug": "assembly-line",
63-
"name": "Assembly Line",
6465
"uuid": "b042200f-5bdd-4010-981e-626e40fd2877",
66+
"name": "Assembly Line",
67+
"difficulty": 1,
6568
"concepts": [
6669
"integers",
6770
"floating-point-numbers"
@@ -73,8 +76,9 @@
7376
},
7477
{
7578
"slug": "semi-structured-logs",
76-
"name": "Semi Structured Logs",
7779
"uuid": "1924b87a-9246-456f-8fc1-111f922a8cf3",
80+
"name": "Semi Structured Logs",
81+
"difficulty": 1,
7882
"concepts": [
7983
"enums"
8084
],
@@ -85,8 +89,9 @@
8589
},
8690
{
8791
"slug": "resistor-color",
88-
"name": "Resistor Color",
8992
"uuid": "51c31e6a-b7ec-469d-8a28-dd821fd857d2",
93+
"name": "Resistor Color",
94+
"difficulty": 1,
9095
"concepts": [
9196
"external-crates"
9297
],
@@ -98,8 +103,9 @@
98103
},
99104
{
100105
"slug": "health-statistics",
101-
"name": "Health Statistics",
102106
"uuid": "3da2420e-9de3-42e0-9127-5ef185673dbb",
107+
"name": "Health Statistics",
108+
"difficulty": 1,
103109
"concepts": [
104110
"methods",
105111
"structs"
@@ -112,8 +118,9 @@
112118
},
113119
{
114120
"slug": "role-playing-game",
115-
"name": "Role-Playing Game",
116121
"uuid": "2445b061-6622-47cb-a7ef-9040ec02458c",
122+
"name": "Role-Playing Game",
123+
"difficulty": 1,
117124
"concepts": [
118125
"option"
119126
],
@@ -125,8 +132,9 @@
125132
},
126133
{
127134
"slug": "low-power-embedded-game",
128-
"name": "Low-Power Embedded Game",
129135
"uuid": "7f064e9b-f631-48b1-9ed0-a66e8393ceba",
136+
"name": "Low-Power Embedded Game",
137+
"difficulty": 1,
130138
"concepts": [
131139
"tuples",
132140
"destructuring"
@@ -138,8 +146,9 @@
138146
},
139147
{
140148
"slug": "short-fibonacci",
141-
"name": "A Short Fibonacci Sequence",
142149
"uuid": "c481e318-ddd7-4f8a-91eb-dadb7315e304",
150+
"name": "A Short Fibonacci Sequence",
151+
"difficulty": 1,
143152
"concepts": [
144153
"vec-macro"
145154
],
@@ -151,8 +160,9 @@
151160
},
152161
{
153162
"slug": "rpn-calculator",
154-
"name": "RPN Calculator",
155163
"uuid": "25cc722b-211d-4271-9381-fdfe16b41301",
164+
"name": "RPN Calculator",
165+
"difficulty": 4,
156166
"concepts": [
157167
"vec-stack"
158168
],
@@ -166,8 +176,9 @@
166176
},
167177
{
168178
"slug": "csv-builder",
169-
"name": "CSV builder",
170179
"uuid": "10c9f505-9aef-479f-b689-cb7959572482",
180+
"name": "CSV builder",
181+
"difficulty": 1,
171182
"concepts": [
172183
"string-vs-str"
173184
],
@@ -202,7 +213,8 @@
202213
"strings"
203214
],
204215
"prerequisites": [],
205-
"difficulty": 1
216+
"difficulty": 1,
217+
"topics": []
206218
},
207219
{
208220
"slug": "gigasecond",
@@ -212,7 +224,8 @@
212224
"external-crates"
213225
],
214226
"prerequisites": [],
215-
"difficulty": 1
227+
"difficulty": 1,
228+
"topics": []
216229
},
217230
{
218231
"slug": "clock",
@@ -277,7 +290,10 @@
277290
"uuid": "117d6a25-960e-4d53-8347-a20490f60f36",
278291
"practices": [],
279292
"prerequisites": [],
280-
"difficulty": 7
293+
"difficulty": 7,
294+
"topics": [
295+
"board_state"
296+
]
281297
},
282298
{
283299
"slug": "minesweeper",
@@ -323,19 +339,20 @@
323339
"practices": [],
324340
"prerequisites": [],
325341
"difficulty": 1,
326-
"status": "deprecated",
327342
"topics": [
328343
"case",
329344
"vectors"
330-
]
345+
],
346+
"status": "deprecated"
331347
},
332348
{
333349
"slug": "bottle-song",
334350
"name": "Bottle Song",
335351
"uuid": "31e8185b-39d8-48c6-88a0-f302e2864f16",
336352
"practices": [],
337353
"prerequisites": [],
338-
"difficulty": 1
354+
"difficulty": 1,
355+
"topics": []
339356
},
340357
{
341358
"slug": "difference-of-squares",
@@ -448,7 +465,8 @@
448465
"strings"
449466
],
450467
"prerequisites": [],
451-
"difficulty": 1
468+
"difficulty": 1,
469+
"topics": []
452470
},
453471
{
454472
"slug": "high-scores",
@@ -494,10 +512,10 @@
494512
"practices": [],
495513
"prerequisites": [],
496514
"difficulty": 1,
497-
"status": "deprecated",
498515
"topics": [
499516
"math"
500-
]
517+
],
518+
"status": "deprecated"
501519
},
502520
{
503521
"slug": "series",
@@ -518,6 +536,7 @@
518536
"practices": [],
519537
"prerequisites": [],
520538
"difficulty": 1,
539+
"topics": [],
521540
"status": "deprecated"
522541
},
523542
{
@@ -527,6 +546,7 @@
527546
"practices": [],
528547
"prerequisites": [],
529548
"difficulty": 1,
549+
"topics": [],
530550
"status": "deprecated"
531551
},
532552
{
@@ -536,27 +556,29 @@
536556
"practices": [],
537557
"prerequisites": [],
538558
"difficulty": 1,
539-
"status": "deprecated",
540559
"topics": [
541560
"match",
542561
"strings"
543-
]
562+
],
563+
"status": "deprecated"
544564
},
545565
{
546566
"slug": "kindergarten-garden",
547567
"name": "Kindergarten Garden",
548568
"uuid": "c27e4878-28a4-4637-bde2-2af681a7ff0d",
549569
"practices": [],
550570
"prerequisites": [],
551-
"difficulty": 1
571+
"difficulty": 1,
572+
"topics": []
552573
},
553574
{
554575
"slug": "eliuds-eggs",
555576
"name": "Eliud's Eggs",
556577
"uuid": "2d738c77-8dde-437a-bf42-ed5542a414d1",
557578
"practices": [],
558579
"prerequisites": [],
559-
"difficulty": 1
580+
"difficulty": 1,
581+
"topics": []
560582
},
561583
{
562584
"slug": "acronym",
@@ -723,7 +745,8 @@
723745
"strings"
724746
],
725747
"prerequisites": [],
726-
"difficulty": 4
748+
"difficulty": 4,
749+
"topics": []
727750
},
728751
{
729752
"slug": "nucleotide-count",
@@ -1302,31 +1325,35 @@
13021325
"uuid": "8c044530-9deb-4ff7-a638-98d6c05ebbb8",
13031326
"practices": [],
13041327
"prerequisites": [],
1305-
"difficulty": 4
1328+
"difficulty": 4,
1329+
"topics": []
13061330
},
13071331
{
13081332
"slug": "knapsack",
13091333
"name": "Knapsack",
13101334
"uuid": "cbccd0c5-eb15-4705-9a4c-0209861f078c",
13111335
"practices": [],
13121336
"prerequisites": [],
1313-
"difficulty": 4
1337+
"difficulty": 4,
1338+
"topics": []
13141339
},
13151340
{
13161341
"slug": "yacht",
13171342
"name": "Yacht",
13181343
"uuid": "1a0e8e34-f578-4a53-91b0-8a1260446553",
13191344
"practices": [],
13201345
"prerequisites": [],
1321-
"difficulty": 4
1346+
"difficulty": 4,
1347+
"topics": []
13221348
},
13231349
{
13241350
"slug": "matrix",
13251351
"name": "Matrix",
13261352
"uuid": "9fceeb8b-0154-45f0-93a5-7117d4d81449",
13271353
"practices": [],
13281354
"prerequisites": [],
1329-
"difficulty": 4
1355+
"difficulty": 4,
1356+
"topics": []
13301357
},
13311358
{
13321359
"slug": "fizzy",
@@ -1525,13 +1552,13 @@
15251552
"practices": [],
15261553
"prerequisites": [],
15271554
"difficulty": 7,
1528-
"status": "deprecated",
15291555
"topics": [
15301556
"from_primitive",
15311557
"music_theory",
15321558
"to_primitive",
15331559
"traits"
1534-
]
1560+
],
1561+
"status": "deprecated"
15351562
},
15361563
{
15371564
"slug": "dominoes",
@@ -1704,51 +1731,51 @@
17041731
],
17051732
"key_features": [
17061733
{
1734+
"icon": "fast",
17071735
"title": "Performance",
1708-
"content": "Rust is blazingly fast and memory-efficient; it has no runtime or garbage collector.",
1709-
"icon": "fast"
1736+
"content": "Rust is blazingly fast and memory-efficient; it has no runtime or garbage collector."
17101737
},
17111738
{
1739+
"icon": "stable",
17121740
"title": "Reliability",
1713-
"content": "Rust’s rich type system and ownership model guarantee memory-safety and thread-safety.",
1714-
"icon": "stable"
1741+
"content": "Rust’s rich type system and ownership model guarantee memory-safety and thread-safety."
17151742
},
17161743
{
1744+
"icon": "productive",
17171745
"title": "Productivity",
1718-
"content": "Rust has great documentation, a friendly compiler with useful error messages, and top-notch tooling.",
1719-
"icon": "productive"
1746+
"content": "Rust has great documentation, a friendly compiler with useful error messages, and top-notch tooling."
17201747
},
17211748
{
1749+
"icon": "tooling",
17221750
"title": "Cargo",
1723-
"content": "Rust's package manager and build tool is best-in-class.",
1724-
"icon": "tooling"
1751+
"content": "Rust's package manager and build tool is best-in-class."
17251752
},
17261753
{
1754+
"icon": "cross-platform",
17271755
"title": "Write Once, Run Anywhere",
1728-
"content": "Rust compiles by default to a single static executable, and cross-compilation is easy.",
1729-
"icon": "cross-platform"
1756+
"content": "Rust compiles by default to a single static executable, and cross-compilation is easy."
17301757
},
17311758
{
1759+
"icon": "fun",
17321760
"title": "❤︎",
1733-
"content": "Stack Overflow's most-loved language every year since 2016.",
1734-
"icon": "fun"
1761+
"content": "Stack Overflow's most-loved language every year since 2016."
17351762
}
17361763
],
17371764
"tags": [
1738-
"execution_mode/compiled",
17391765
"paradigm/functional",
17401766
"paradigm/imperative",
17411767
"paradigm/procedural",
1742-
"platform/android",
1743-
"platform/ios",
1744-
"platform/linux",
1768+
"typing/static",
1769+
"typing/strong",
1770+
"execution_mode/compiled",
1771+
"platform/windows",
17451772
"platform/mac",
1773+
"platform/linux",
1774+
"platform/ios",
1775+
"platform/android",
17461776
"platform/web",
1747-
"platform/windows",
17481777
"runtime/standalone_executable",
17491778
"runtime/wasmtime",
1750-
"typing/static",
1751-
"typing/strong",
17521779
"used_for/backends",
17531780
"used_for/cross_platform_development",
17541781
"used_for/embedded_systems",
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Instructions append
2+
3+
## Performance Hint
4+
5+
All the inputs and outputs are in ASCII.
6+
Rust `String`s and `&str` are utf8, so while one might expect `"Hello".chars()` to be simple, it actually has to check each char to see if it's 1, 2, 3 or 4 `u8`s long.
7+
If we know a `&str` is ASCII then we can call `.as_bytes()` and refer to the underlying data as a `&[u8]` (byte slice).
8+
Iterating over a slice of ASCII bytes is much quicker as there are no codepoints involved - every ASCII byte is one `u8` long.
9+
10+
Can you complete the challenge without cloning the input?

0 commit comments

Comments
 (0)