You may refer to the Floating Front Design algorithm (discussed in Queue and in code) for this

Related Book For  answer-question

Financial Accounting

ISBN: 978-1259307959

4th edition

Authors: David Spiceland, Wayne Thomas, Don Herrmann

Posted Date: