Advanced Data Structures And Algorithm Test! Trivia Quiz

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Abhiram
A
Abhiram
Community Contributor
Quizzes Created: 3 | Total Attempts: 933
| Attempts: 656 | Questions: 25
Please wait...
Question 1 / 25
0 %
0/100
Score 0/100
1. What are the 3 imp features of OOPS

Explanation

The three important features of Object-Oriented Programming (OOPS) are encapsulation, inheritance, and polymorphism. Encapsulation refers to the bundling of data and methods together, allowing access to the data only through defined methods. Inheritance enables the creation of new classes by inheriting properties and behaviors from existing classes, promoting code reuse. Polymorphism allows objects of different classes to be treated as objects of a common superclass, providing flexibility and extensibility in programming.

Submit
Please wait...
About This Quiz
Advanced Data Structures And Algorithm Test! Trivia Quiz - Quiz

We all know the importance of having access to your data when you need it. It is therefore important to ensure that data is collected and organized accurately;... see morethis is achieved in various ways. Test your knowledge of data structure and algorithm by taking the quiz below. Best of luck!
see less

2. Using Double linked lists we can implement deque

Explanation

A double linked list is a type of data structure that consists of nodes, where each node contains a reference to the previous and next node in the list. This allows for efficient insertion and deletion of elements at both ends of the list, making it suitable for implementing a deque (double-ended queue). Therefore, the statement that using double linked lists we can implement a deque is true.

Submit
3. In a Binary tree we can insert___________ nodes as its children

Explanation

In a binary tree, each node can have a maximum of two children. Therefore, we can insert a maximum of two nodes as children for each node in the binary tree.

Submit
4. All search trees will have traversing techniques

Explanation

The statement is stating that all search trees will have traversing techniques. This means that regardless of the specific type or structure of a search tree, there will always be techniques available to traverse or navigate through the tree. Therefore, the answer is true.

Submit
5. The tree traversals are

Explanation

The correct answer is "inorder,preorder,postorder". These are the three common types of tree traversals. In inorder traversal, the left subtree is visited first, then the root, and finally the right subtree. Preorder traversal visits the root first, then the left subtree, and finally the right subtree. Postorder traversal visits the left subtree first, then the right subtree, and finally the root. These traversals are used to visit all the nodes in a tree in a specific order.

Submit
6. In single linked list we can traverse from back to front

Explanation

In a single linked list, each node only has a reference to the next node, so it is not possible to traverse from back to front. To traverse a linked list, we start from the head node and follow the next pointers until we reach the end of the list. Therefore, the given statement is false.

Submit
7. What is reference variable in C++

Explanation

A reference variable in C++ behaves like a pointer variable, as it holds the address of another variable. It can be used for call by reference, allowing the referenced variable to be modified within a function. Therefore, the correct answer is "all", as all the given statements accurately describe the characteristics and usage of reference variables in C++.

Submit
8. Containership in c++ refers to

Explanation

The correct answer is declaring objects of a class as members in another class. In C++, a containership refers to the practice of including objects of one class within another class. This allows for the creation of complex data structures and facilitates the organization and management of related data. By declaring objects of a class as members in another class, the container class can access and manipulate the data and functionality of the contained class.

Submit
9. Virtual base class is

Explanation

The virtual base class is useful in hybrid inheritance to avoid ambiguity when accessing the grandparent by the grandchild. This is because in hybrid inheritance, a class can inherit from multiple classes, which can lead to the same member being inherited multiple times. By making the base class virtual, it ensures that there is only one instance of the base class, resolving any ambiguity that may arise.

Submit
10. Application of satack is

Explanation

The correct answer is recursion. Recursion is a programming technique where a function calls itself to solve a problem by breaking it down into smaller subproblems. It is commonly used in algorithms and data structures to solve complex problems efficiently. In the given options, BFS (breadth-first search) and railway reservation are specific applications or use cases that can make use of recursion, but they are not the general application of recursion. The option "none" is incorrect as recursion is a valid application.

Submit
11. In fold and  method of hashing we can

Explanation

The correct answer states that in the fold and method of hashing, we have the flexibility to fold either from the left or right side, or even both sides. This means that when using the fold method in hashing, we are not restricted to folding in a specific direction. We have the option to fold the data in whichever way is most suitable for the hashing process.

Submit
12. A recursive function will be infinite recursive if the following were left out

Explanation

If the base criteria were left out in a recursive function, there would be no condition to stop the recursion. The base criteria is the condition that determines when the recursive function should stop calling itself and return a value. Without this condition, the recursive function would continue to call itself indefinitely, resulting in an infinite recursion.

Submit
13. Abstract class

Explanation

An abstract class is a class that cannot be instantiated on its own, meaning you cannot create objects of that class. However, it can be inherited by other classes. Inheritance allows the child class to inherit the properties and methods of the abstract class, enabling code reuse and creating a hierarchical relationship between classes. Therefore, the correct answer is that an abstract class can be inherited.

Submit
14. C++ was developed by

Explanation

C++ was developed by Bjarne Stroustrup.

Submit
15. Sparse matrix is

Explanation

A sparse matrix is mostly filled with zeros. In a sparse matrix, the majority of the elements are zero, while only a few elements have non-zero values. This characteristic of having mostly zeros makes sparse matrices different from dense matrices, where most of the elements are non-zero. Sparse matrices are commonly encountered in various fields, such as scientific computing and data analysis, where they help in efficient storage and computation by avoiding unnecessary calculations with zeros.

Submit
16. An application uses encapsulation to achive

Explanation

Encapsulation in an application refers to the practice of bundling data and methods together within a class, hiding the internal details and providing a public interface for accessing and manipulating the data. This technique achieves information or data hiding by preventing direct access to the internal data, ensuring that it can only be modified through the defined methods. Additionally, encapsulation helps minimize independence among modules by allowing changes to be made to the internal implementation of a class without affecting other parts of the application. It also promotes implementation independence by providing a clear separation between the internal workings of a class and its external usage. Therefore, all of the given options are correct explanations for why an application uses encapsulation.

Submit
17. Time taken to insert an element in a queue is

Explanation

The correct answer is O(n) because in a queue, elements are inserted at the rear end, and to insert an element, we need to traverse through all the existing elements in the queue until we reach the end. Therefore, the time complexity of inserting an element in a queue is directly proportional to the number of elements already present in the queue, which is represented as O(n).

Submit
18. Hashing is

Explanation

Hashing is a technique used for address finding in random file organization. It involves the use of a hash function to map data elements to specific locations in a hash table or an array. This allows for quick retrieval of data based on its key or address, making it efficient for random access to files. Hashing is not related to header file inclusion or sequential file organization.

Submit
19. OOP allow extension of object function  or class of function.This ability with in OOP is called

Explanation

Scalability refers to the ability of a system or software to handle increasing amounts of work or to accommodate growth. In the context of Object-Oriented Programming (OOP), scalability refers to the ability to easily extend or add new functionality to objects or classes without affecting the existing code. This allows for the development of flexible and adaptable software systems that can easily accommodate changes and expansions in requirements.

Submit
20. A multiply list is

Explanation

A multiply list is a list in which each node has multiple fields and is also used as a representation of a sparse matrix. This means that each node in the list contains multiple values or attributes, making it a versatile data structure. Additionally, it is specifically designed to efficiently store and manipulate sparse matrices, which have a large number of zero elements. Therefore, both options b and c are correct.

Submit
21. We can overload ___ operators

Explanation

The correct answer is "=" because the "=" operator can be overloaded in C++ to define a custom behavior for assignment operations between objects of a user-defined class. This allows for more flexibility and control over how objects are assigned values.

Submit
22. Can we use friend function for overlaoding= operator

Explanation

The correct answer is "we can't". This is because the assignment operator (=) cannot be overloaded using a friend function. The assignment operator can only be overloaded using a member function.

Submit
23. Friend function is

Explanation

A friend function violates class property because it is not a member of the class, yet it has access to the private and protected members of the class. This breaks the principle of encapsulation, which aims to hide the internal details of a class and only allow access through member functions. Friend functions can be useful in certain cases, such as when they need to access multiple classes or when they require direct access to private members, but they should be used sparingly to maintain the integrity of the class.

Submit
24. If we use protected as access specifier in accessing base class ,the private member in base class becomes________ in derived class

Explanation

When we use the "protected" access specifier in accessing the base class, the private member in the base class becomes "not accessible" in the derived class. This is because the "protected" access specifier allows the derived class to access the members of the base class, but it does not allow access to private members. Therefore, the private member in the base class cannot be accessed or inherited by the derived class.

Submit
25. Time taken to insert in to a linked queue

Explanation

The correct answer is O(nlog2n) because the time taken to insert an element into a linked queue is directly proportional to the number of elements already present in the queue. As the number of elements increases, the time taken to insert also increases. Additionally, the logarithmic factor (log2n) suggests that the time complexity grows at a slower rate compared to O(n), but still increases significantly as the size of the queue grows. Therefore, the time complexity for insertion in a linked queue is O(nlog2n).

Submit
View My Results

Quiz Review Timeline (Updated): Mar 21, 2023 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 21, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Aug 02, 2010
    Quiz Created by
    Abhiram
Cancel
  • All
    All (25)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
What are the 3 imp features of OOPS
Using Double linked lists we can implement deque
In a Binary tree we can insert___________ nodes as its children
All search trees will have traversing techniques
The tree traversals are
In single linked list we can traverse from back to front
What is reference variable in C++
Containership in c++ refers to
Virtual base class is
Application of satack is
In fold and  method of hashing we can
A recursive function will be infinite recursive if the following were...
Abstract class
C++ was developed by
Sparse matrix is
An application uses encapsulation to achive
Time taken to insert an element in a queue is
Hashing is
OOP allow extension of object function  or class of function.This...
A multiply list is
We can overload ___ operators
Can we use friend function for overlaoding= operator
Friend function is
If we use protected as access specifier in accessing base class ,the...
Time taken to insert in to a linked queue
Alert!

Advertisement