Details of this Paper

Russian flag problem

Description

solution


Question

The Russian flag problem is to rearrange an array of characters R, W, and B so that R is the first character, R is followed by a W, W is followed by a B, B is followed by another R, and the pattern repeats. Design a linear algorithm (pseudo code) for this problem.

 

Paper#67479 | Written in 18-Jul-2015

Price : $27
SiteLock