Start Discovering Solved Questions and Your Course Assignments
TextBooks Included
Active Tutors
Asked Questions
Answered Questions
q. explain the complexity of an algorithm? what are the worst case analysis and best case analysis explain with an
q. sort the sequence written below of keys using merge sort.66 77 11 88 99 22 33 44
q. which sorting algorithm can be easily adaptable for singly linked lists? explain your answer as well. ansthe simple
q. the reason bubble sort algorithm is inefficient is that it continues execution even after an array is sorted by performing unnecessary
q. write down the non-recursive algorithm to traverse a tree in preorder.ansthe non- recursive algorithm for preorder traversal is written below
q. the degree of a node is defined as the number of children it has. shear show that in any binary tree the total number of leaves is one more than
q. the two binary trees are said to be similar if they are both empty or if they are both non- empty and left and right sub trees are similar. write
q. perform implementation of a queue using a singly linked list l. the operations inser and delete should take o 1 time.
q. an array a comprises of n unique integers from the range x to yx and y inclusive where ny-x. which means there is only one member that is not in
q. describe the term array. how do we represent two-dimensional arrays in memory? explain how we calculate the address of an element in a two
a depth-first traversal of a tree visits a nodefirst and then recursively visits the subtrees of that node. similarly depth-first traversal of a
merge sort is a sorting algorithm which uses the basic idea of divide and conquers. this algorithm initially divides the array into two halves sorts
the total of time needed by an algorithm to run to its completion is termed as time complexity. the asymptotic running time
unlike a binary-tree each node of a b-tree may have a number of keys and children. the keys are stored or saved in non-decreasing order. each key has
q. reverse the order of the elements on a stack s i by using two additional stacks ii by using one additional queue.ans
two linked lists are having information of the same type in ascending order. write down a module to merge them to a single linked list that is
post-order traversal this can be done by both iteratively and recursively. the iterative solution would require a modification or alteration of
write steps for algorithm for in-order traversalthis process when implemented iteratively also needs a stack and a boolean to prevent the execution
hear is given a set of input representing the nodes of a binary tree write a non recursive algorithm that must be able to give the output in three
explain what are circular queues? write down routines required for inserting and deleting elements from a circular queue implemented using
write an algorithm to calculate a postfix expression. execute your algorithm using the given postfix expression as your input a b c d f
explain an efficient method of storing a sparse matrix in memory. write a module to find the transpose of the sparse matrix stored in this way.a
compare two functions n2 and 2n 4 for distinct values of n. determine when second function becomes larger than first
what is complexity of an algorithm? what is the basic relation between the time and space complexities of an algorithm? justify your answer by giving
what do we mean by algorithm? what are the characteristics of a good and relevant algorithm?an algorithm is a step-by-step procedure for finishing