Skip to content

Commit

Permalink
Switched to modern {cases}
Browse files Browse the repository at this point in the history
  • Loading branch information
patmorin committed Jul 12, 2017
1 parent 91dece9 commit 40c2e5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions latex/arrays.tex
Original file line number Diff line number Diff line change
Expand Up @@ -548,11 +548,11 @@ \section{#DualArrayDeque#: Building a Deque from Two Stacks}
#n#/4$. Summarizing the situation, we have
\[
\mbox{Running time of } #add(i,x)# \le
\left\{\begin{array}{ll}
\begin{cases}
O(1+ #i#) & \mbox{if $#i#< #n#/4$} \\
O(#n#) & \mbox{if $#n#/4 \le #i# < 3#n#/4$} \\
O(1+#n#-#i#) & \mbox{if $#i# \ge 3#n#/4$}
\end{array}\right.
\end{cases}
\]
Thus, the running time of #add(i,x)#, if we ignore the cost of the call
to #balance()#, is $O(1+\min\{#i#, #n#-#i#\})$.
Expand Down

0 comments on commit 40c2e5c

Please sign in to comment.