Skip to content

Commit

Permalink
Add concepts to approaches (#2166)
Browse files Browse the repository at this point in the history
* bank-account: add tags to approaches

* collatz-conjecture: add tags to approaches

* difference-of-squares: add tags to approaches

* darts: add tags to approaches

* diffie-hellman: add tags to approaches

* two-fer: add tags to approaches

* series: add tags to approaches

* sieve: add tags to approaches

* gigasecond: add tags to approaches

* grains: add tags to approaches

* bob: add tags to approaches

* grade-school: add tags to approaches

* hamming: add tags to approaches

* reverse-string: add tags to approaches

* isogram: add tags to approaches

* pangram: add tags to approaches

* yacht: add tags to approaches

* pig-latin: add tags to approaches

* raindrops: add tags to approaches

* leap: add tags to approaches

* proverb: add tags to approaches

* palindrome-products: add tags to approaches

* perfect-numbers: add tags to approaches

* rna-transcription: add tags to approaches

* parallel-letter-frequency: add tags to approaches

* protein-translation: add tags to approaches
  • Loading branch information
ErikSchierboom authored Oct 4, 2023
1 parent d5044e6 commit 3e680f0
Show file tree
Hide file tree
Showing 26 changed files with 274 additions and 61 deletions.
10 changes: 8 additions & 2 deletions exercises/practice/bank-account/.approaches/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
"blurb": "Use a lock statement to prevent concurrent balance updates.",
"authors": [
"erikschierboom"
]
],
"tags": {
"all": ["construct:lock"]
}
},
{
"uuid": "b6d6ab21-82bb-4285-a840-5bc209ec9524",
Expand All @@ -21,7 +24,10 @@
"blurb": "Use a Mutex to prevent concurrent balance updates.",
"authors": [
"erikschierboom"
]
],
"tags": {
"all": ["uses:Mutex"]
}
}
]
}
30 changes: 26 additions & 4 deletions exercises/practice/bob/.approaches/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,18 @@
"blurb": "Use if statements to return the answer.",
"authors": [
"bobahop"
]
],
"tags": {
"all": ["construct:if"],
"not": [
"technique:regular-expression",
"construct:switch",
"construct:switch-expression",
"construct:array",
"construct:list",
"construct:dictionary"
]
}
},
{
"uuid": "567f04d3-368e-4874-9fde-07ce1f7b199f",
Expand All @@ -24,7 +35,11 @@
"blurb": "Use switch on a tuple to return the answer.",
"authors": [
"bobahop"
]
],
"tags": {
"all": ["construct:tuple"],
"any": ["construct:switch", "construct:switch-expression"]
}
},
{
"uuid": "8b31fcf5-229e-474a-aaf5-b00dc5d977c5",
Expand All @@ -33,7 +48,11 @@
"blurb": "Index into an array to return the answer.",
"authors": [
"bobahop"
]
],
"tags": {
"all": ["construct:array"],
"not": ["technique:regular-expression", "construct:tuple"]
}
},
{
"uuid": "4fb2cc1b-197f-458f-80fb-cdc6746ff0d6",
Expand All @@ -42,7 +61,10 @@
"blurb": "Use regular expressions to return the answer.",
"authors": [
"erikschierboom"
]
],
"tags": {
"all": ["technique:regular-expression"]
}
}
]
}
15 changes: 12 additions & 3 deletions exercises/practice/collatz-conjecture/.approaches/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
"blurb": "Use a while loop to find the number of steps.",
"authors": [
"erikschierboom"
]
],
"tags": {
"all": ["construct:while-loop"]
}
},
{
"uuid": "8c7199ed-d74d-4e3d-b9d0-5f8595597528",
Expand All @@ -21,7 +24,10 @@
"blurb": "Use recursion to find the number of steps.",
"authors": [
"erikschierboom"
]
],
"tags": {
"all": ["technique:recursion"]
}
},
{
"uuid": "4f91abfb-4c83-4e6d-84bc-bd08211d34d6",
Expand All @@ -30,7 +36,10 @@
"blurb": "Use a (lazy) sequence and count its elements to find the number of steps.",
"authors": [
"erikschierboom"
]
],
"tags": {
"all": ["uses:Enumerable.Count", "uses:yield"]
}
}
]
}
10 changes: 8 additions & 2 deletions exercises/practice/darts/.approaches/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
"blurb": "Use if statements.",
"authors": [
"erikschierboom"
]
],
"tags": {
"all": ["construct:if"]
}
},
{
"uuid": "5f0878ae-8faf-4db9-b3d5-775e2d9bff37",
Expand All @@ -21,7 +24,10 @@
"blurb": "Use a switch expression.",
"authors": [
"erikschierboom"
]
],
"tags": {
"any": ["construct:switch", "construct:switch-expression"]
}
}
]
}
15 changes: 12 additions & 3 deletions exercises/practice/difference-of-squares/.approaches/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
"blurb": "Use LINQ to calculate the sums.",
"authors": [
"erikschierboom"
]
],
"tags": {
"all": ["uses:linq"]
}
},
{
"uuid": "a6118dd7-26d5-4576-919f-11a584beeef8",
Expand All @@ -21,7 +24,10 @@
"blurb": "Use a for statement to calculate the sums.",
"authors": [
"erikschierboom"
]
],
"tags": {
"all": ["construct:for-loop"]
}
},
{
"uuid": "bdcb02d2-1a34-4a52-a80c-ca94907ba721",
Expand All @@ -30,7 +36,10 @@
"blurb": "Use math to calculate the sums.",
"authors": [
"erikschierboom"
]
],
"tags": {
"all": ["technique:math"]
}
}
]
}
5 changes: 4 additions & 1 deletion exercises/practice/diffie-hellman/.approaches/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
"blurb": "Use the BigInteger class to easily implement diffie-hellman.",
"authors": [
"erikschierboom"
]
],
"tags": {
"all": ["construct:big-integer"]
}
}
]
}
10 changes: 8 additions & 2 deletions exercises/practice/gigasecond/.approaches/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
"blurb": "Add a gigasecond via AddSeconds().",
"authors": [
"erikschierboom"
]
],
"tags": {
"all": ["uses:DateTime.AddSeconds"]
}
},
{
"uuid": "f241c90d-6cba-49ad-9e8e-59cac73ca6e5",
Expand All @@ -21,7 +24,10 @@
"blurb": "Add a gigasecond via a TimeSpan.",
"authors": [
"erikschierboom"
]
],
"tags": {
"all": ["uses:DateTime.Plus(TimeSpan)"]
}
}
]
}
5 changes: 4 additions & 1 deletion exercises/practice/grade-school/.approaches/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
"blurb": "Use specialized sorted collections for automatic sorting.",
"authors": [
"erikschierboom"
]
],
"tags": {
"all": ["technique:sorted-collection"]
}
}
]
}
15 changes: 12 additions & 3 deletions exercises/practice/grains/.approaches/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
"blurb": "Use Math.Pow to raise 2 by a specified power.",
"authors": [
"bobahop"
]
],
"tags": {
"all": ["uses:Math.Pow"]
}
},
{
"uuid": "71f823dc-c667-46ee-875f-6e73918d0336",
Expand All @@ -21,7 +24,10 @@
"blurb": "Use bit-shifting to raise 2 by a specified power.",
"authors": [
"bobahop"
]
],
"tags": {
"all": ["technique:bit-shifting"]
}
},
{
"uuid": "076f430a-3779-4249-a190-b75110da455b",
Expand All @@ -30,7 +36,10 @@
"blurb": "Use UInt64.MaxValue for Total.",
"authors": [
"bobahop"
]
],
"tags": {
"all": ["uses:ulong.MaxValue"]
}
}
]
}
10 changes: 8 additions & 2 deletions exercises/practice/hamming/.approaches/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
"blurb": "Calculate the hamming distance via LINQ.",
"authors": [
"erikschierboom"
]
],
"tags": {
"all": ["uses:linq"]
}
},
{
"uuid": "d210b47c-b61d-4a73-be55-23c68ce1b600",
Expand All @@ -21,7 +24,10 @@
"blurb": "Calculate the hamming distance using a for-loop.",
"authors": [
"erikschierboom"
]
],
"tags": {
"all": ["construct:for-loop"]
}
}
]
}
15 changes: 12 additions & 3 deletions exercises/practice/isogram/.approaches/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
"blurb": "Use Distinct with Count to return the answer.",
"authors": [
"bobahop"
]
],
"tags": {
"all": ["uses:Enumerable.Distinct"]
}
},
{
"uuid": "78bc9485-94b7-4bac-8ce6-d577e85670a1",
Expand All @@ -21,7 +24,10 @@
"blurb": "Use GroupBy with All and Count to return the answer.",
"authors": [
"bobahop"
]
],
"tags": {
"all": ["uses:Enumerable.GroupBy"]
}
},
{
"uuid": "5a77a3ff-8474-4238-bf23-c7c657f27e34",
Expand All @@ -30,7 +36,10 @@
"blurb": "Use a bit field to keep track of used letters.",
"authors": [
"bobahop"
]
],
"tags": {
"all": ["technique:bit-shifting"]
}
}
]
}
27 changes: 22 additions & 5 deletions exercises/practice/leap/.approaches/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
"blurb": "Use a chain of boolean expressions.",
"authors": [
"bobahop"
]
],
"tags": {
"all": ["technique:boolean-logic"]
}
},
{
"uuid": "eebe5a57-7e58-44c2-92e6-50f46f1251ac",
Expand All @@ -24,7 +27,11 @@
"blurb": "Use a ternary operator of boolean expressions.",
"authors": [
"bobahop"
]
],
"tags": {
"all": ["construct:ternary"],
"not": ["construct:logical-and", "construct:logical-or"]
}
},
{
"uuid": "cb7c88a6-49f3-4744-a3e8-fcc7acc0770d",
Expand All @@ -33,7 +40,11 @@
"blurb": "Use a switch on a tuple made from boolean expressions.",
"authors": [
"bobahop"
]
],
"tags": {
"all": ["construct:tuple"],
"any": ["construct:switch-expression", "construct:switch"]
}
},
{
"uuid": "1691a675-03a5-47da-a878-f76cfb895dc6",
Expand All @@ -42,7 +53,10 @@
"blurb": "Use DateTime addition.",
"authors": [
"bobahop"
]
],
"tags": {
"all": ["uses:DateTime.AddDays"]
}
},
{
"uuid": "28483396-da67-4f59-8388-4c63065dab00",
Expand All @@ -51,7 +65,10 @@
"blurb": "Use the built-in method.",
"authors": [
"bobahop"
]
],
"tags": {
"all": ["uses:DateTime.IsLeapYear"]
}
}
]
}
Loading

0 comments on commit 3e680f0

Please sign in to comment.