classic computer science problems in swift
acci(_ n: Int) -> Int { if n <= 1 { return n } var prev = 0 var curr = 1 for _ in 2...n { let next = prev + curr prev = curr curr = next } return curr } Problem: Knapsack Problem The 0/1 Knapsack problem involves maximizing the total value of items without exceeding weight cap