next up previous
Next: OPTIMALITY Up: SPACE COMPLEXITY Previous: SPACE COMPLEXITY

Trade-off between time & space


If number are between $1$ and $100$, then a prepared index array $A[1\ldots 100]$ such that

$A[i]=j$, if $L[j]=i$; else $A[i]=0$

can yield $W(n)=O(1)$.

(characteristic array)



Sushil_Prasad 2012-08-23