[wpdm_package id=’1341′] Algorithm: [sourcecode lang=”cpp”] void ReverseQueue( Queue *Q) { Stack *S; while(!ISEmptyQueue(Q)) Push(S, Dequeue(Q)); while(!IsEmptyStack(S)) Enqueue(Q, Pop(S)); } [/sourcecode]

[wpdm_package id=’1292′] Algorithm Input number and bit to unset i.e. number=12 bit=3 Left shift 1 by (bit-1) times and take exclusive not of it i.e.…

[wpdm_package id=’1290′] Algorithm Input number and bit to set i.e Let number is 12 and bit is 2 Left shift 1 by (bit-1) times i.e.…

[wpdm_package id=’1282′] Algorithm Input number and bit to check. Let input number is 12 and bit to check is 3 Right shift number by K-1…

[wpdm_file id=47] Algorithm Take EndPosition to find as input Map all the list values, to attain constant searching time Find StartPosition by StartPosition=(Size_of_list-EndPosition)+1 Find the…

[wpdm_package id=’1339′] Algorithm: Create a Stack. while(end of input is not reached) { if the character read is not a symbol to be balanced, ignore…