COMPLETE QUESTIONS WITH CORRECT DETAILED
ANSWERS|| LATEST VERSION!!
What is data structure? - ANSWERData structures refers
to the way data is organized and manipulated. It seeks to
find ways to make data access more efficient. When
dealing with data structure, we not only focus on one piece
of data, but rather different set of data and how they can
relate to one another in an organized manner.
What is the advantage of the heap over a stack? -
ANSWERBasically, the heap is more flexible than the
stack. That's because memory space for the heap can be
dynamically allocated and de-allocated as needed.
,However, memory of the heap can at times be slower
when compared to that stack.
What is a postfix expression? - ANSWERA postfix
expression is an expression in which each operator
follows its operands. The advantage of this form is that
there is no need to group sub-expressions in parentheses
or to consider operator precedence.
What is Data abstraction? - ANSWERData abstraction is a
powerful tool for breaking down complex data problems
into manageable chunks. This is applied by initially
specifying the data objects involved and the operations to
be performed on these data objects without being overly
concerned with how the data objects will be represented
and stored in memory.
, How do you insert a new item in a binary search tree? -
ANSWERAssuming that the data to be inserted is a
unique value (that is, not an existing entry in the tree),
check first if the tree is empty. If it's empty, just insert the
new item in the root node. If it's not empty, refer to the new
item's key. If it's smaller than the root's key, insert it into
the root's left subtree, otherwise, insert it into the root's
right subtree.
How does a selection sort work for an array? -
ANSWERThe selection sort is a fairly intuitive sorting
algorithm,, though not necessarily efficient. To perform
this, the smallest element is first located and switched with
the element at subscript zero, thereby placing the smallest
element in the first position. The smallest element