feat: added 03_dom

This commit is contained in:
Philippe Torrel
2026-07-13 10:38:22 +02:00
parent 6292cabfee
commit e0bd3930d9
134 changed files with 21947 additions and 26 deletions

View File

@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="de">
<head>
<meta charset="UTF-8" />
@@ -36,7 +36,17 @@
<script>
'use strict';
const combinations = (n, k) => {};
const combinations = (n, k) => {
if (k === 0 || k === n) {
return 1;
}
if (k > n) {
return 0;
}
return combinations(n - 1, k - 1) + combinations(n - 1, k);
};
// Test Cases
console.log(combinations(5, 2)); // => 10