Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Q. Reverse the order of the elements on a stack S
(i) by using two additional stacks
(ii) by using one additional queue.
Ans: Let S be the stack having n number of elements. Now we need to reverse the elements of S (i) using the two additional stack S1 and S2
while not empty (S)
{ C=pop(S);
push(S1,C);
}
While not empty(S1)
{ C=pop(S1);
push(S2,C);
While not empty(S3)
{ C=pop(S3);
push(S,C);
(ii) using one additional queue Q
enque(Q,C);
While not empty(Q)
{ C=deque(Q);
Algorithm to find sum of square of a number
When there is requirement to access records sequentially by some key value and also to access records directly by the similar key value, the collection of records may be organized
Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec
Consistent Heuristic Function - Graph Search Recall the notions of consistency and admissibility for an A* search heuristic. a. Consider a graph with four nodes S, A, B, C,
In this unit, we will describe a data structure called Graph. Actually, graph is a general tree along no parent-child relationship. In computer science, Graphs have several applica
RGB Model The RGB model is based on the assumption that any desired shade of colour can be obtained by mixing the correct amounts of red, green, and blue light. The exact hues
Algorithm for deletion of any element from the circular queue: Step-1: If queue is empty then say "queue is empty" & quit; else continue Step-2: Delete the "front" element
Records are mapped onto a computer store by simply juxtaposing their elements. The address of a component (field) r relative to the origin address of the record r is named the fiel
how to write prims algorithms? with example
State the complex reallocation procedure Some languages provide arrays whose sizes are established at run-time and can change during execution. These dynamic arrays have an in
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd