LongestIncreasingSubsequence-2x2

Sj binary search to find leftmost stack that fits ci

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: cards by hand. Sj ← binary search to find leftmost stack that fits ci. PUSH (Sj, ci). pred[ci] ← PEEK (Sj–1). null if j = 1 RETURN sequence formed by following pointers from top card of rightmost nonempty stack. ___________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________...
View Full Document

This document was uploaded on 02/11/2014.

Ask a homework question - tutors are online