function constant(n: number) {
const a = 0;
const nums = new Array(10000);
const node = new ListNode(0);
for (let i = 0; i < n; i++) {
const c = 0;
}
}
function linear(n: number) {
const nums = new Array(n);
const nodes: ListNode[] = [];
for (let i = 0; i < n; i++) nodes.push(new ListNode(i));
const map = new Map<number, string>();
for (let i = 0; i < n; i++) map.set(i, String(i));
}
function quadratic(n: number) {
const numMatrix = Array.from({ length: n }, () => new Array(n).fill(0));
const numList: number[][] = [];
for (let i = 0; i < n; i++) {
const row: number[] = [];
for (let j = 0; j < n; j++) row.push(0);
numList.push(row);
}
}
function buildTree(n: number): TreeNode | null {
if (n === 0) return null;
const root = new TreeNode(0);
root.left = buildTree(n - 1);
root.right = buildTree(n - 1);
return root;
}