exercise - and output its value - implement the queue adt using an array - implement the entire queue adt using singly linked list - design an adt for two-colordouble-stack adt that consists of two stacks-one "redand one "blue"--and has as its operations color-coded versions of the regular stack adt operations for examplethis adt should allow for both red push operation and blue push operation give an efficient implementation of this adt using single array whose capacity is set at some value that is assumed to always be larger than the sizes of the red and blue stacks combined - implement the deque adt with doubly linked list - implement the deque adt with an array used in circular fashion - implement the stack and queue interfaces with unique class that extends class nodedeque (code fragment - when share of common stock of some company is soldthe capital gain (orsometimeslossis the difference between the share' selling price and the price originally paid to buy it this rule is easy to understand for single sharebut if we sell multiple shares of stock bought over long period of timethen we must identify the shares actually being sold standard accounting principle for identifying which shares of stock were sold in such case is to use fifo protocol--the shares sold are the ones that have been held the longest (indeedthis is the default method built into several personal finance software packagesfor examplesuppose we buy shares at $ each on day shares at $ on day shares at $ on day and then sell shares on day at $ each then applying the fifo protocol means that of the shares sold were bought on day were bought on day and were bought on day the capital gain in this case would therefore be (- )or