We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1e569e commit c8781baCopy full SHA for c8781ba
lib/dynamic/factorial.dart
@@ -1,3 +1,6 @@
1
int factorial(int n) {
2
- return switch (n) { 0 => 1, _ => n * factorial(n - 1) };
+ return switch (n) {
3
+ 0 => 1,
4
+ _ => n * factorial(n - 1),
5
+ };
6
}
lib/dynamic/fibonacci.dart
@@ -2,6 +2,6 @@ int fibonacci(int n) {
return switch (n) {
0 => 0,
1 => 1,
- _ => fibonacci(n - 1) + fibonacci(n - 2)
+ _ => fibonacci(n - 1) + fibonacci(n - 2),
};
7
0 commit comments