grok-3-mini-beta· xAI
LMArena Human Preference 140K
python fib function one line amortized constant runtime linear memory
- User
python fib function one line amortized constant runtime linear memory
- Assistant
from functools import lru_cache; @lru_cache(maxsize=None) def fib(n): return [0,1][n] if n<2 else fib(n-1)+fib(n-2)
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.