.
  Vyom World.com . Let's Touch the Sky Together!  
.

Home
VyomWorld.com Home
Interview Questions
VyomLinks.com Home
JobsAssist.com Home
Vyom Network
Contact Us
Jobs & Careers
Resume Submitter
Placement Papers
IT Companies Directory
Computer Jobs
Interview Questions
Online Exams
Vyom Career eMag.
Fun
Send FREE SMS!
SMS Jokes
Source Codes Library
Source Codes Home
ASP Source Codes
C Source Codes
C++ Source Codes
COBOL Source Codes
Java Source Codes
Pascal Source Codes
Submit Source Codes
GATE
GATE an Overview
GATE Preparation
Study Materal
GRE
GRE an Overview
GRE Questions
GRE Preparation
GRE Universities
TOEFL Preparation
TOEFL Resources
GMAT Preparation
GMAT Resources
MBA Preparation
MBA Resources
Networking Concepts
Networking Concepts
Testing Preparation
Testing Resources
Webmasters
Free Traffic Builder
Webmaster Articles
Web Hosting
Tutorials
Hardware Tutorial
1500 Free eBooks New!


Home » Placement Papers » HP Placement Papers » HP Previous Year Placement Paper

 

HP Placement Paper - Data Structure Questions And Answers


Advertisements
Advertisements




HP Previous Years Solved Sample Placement Papers

  1. What would be the asymptotic time complexity to insert an element at the front of the linked list (head is known)?

    a) O(1)

    b) O(n)

    c) O(n²)

    d) O(n³)

    Answer: a) O(1)
  2. What would be the asymptotic time complexity to find an element in the linked list?

    a) O(1)

    b) O(n)

    c) O(n²)

    d) O(n⁴)

    Answer: b) O(n)
  3. What would be the asymptotic time complexity to insert an element at the second position in the linked list?

    a) O(1)

    b) O(n)

    c) O(n²)

    d) O(n³)

    Answer: a) O(1)
  4. The concatenation of two lists can be performed in O(1) time. Which of the following variation of the linked list can be used?

    a) Singly linked list

    b) Doubly linked list

    c) Circular doubly linked list

    d) Array implementation of list

    Answer: c) Circular doubly linked list
  5. Consider the following definition in C programming language:
        struct node {
          int data;
          struct node * next;
        };
        typedef struct node NODE;
        NODE *ptr;
        
    Which of the following C code is used to create a new node?

    a) ptr = (NODE*)malloc(sizeof(NODE));

    b) ptr = (NODE*)malloc(NODE);

    c) ptr = (NODE*)malloc(sizeof(NODE*));

    d) ptr = (NODE)malloc(sizeof(NODE));

    Answer: a) ptr = (NODE*)malloc(sizeof(NODE));
  6. What kind of linked list is best to answer questions like “What is the item at position n?”

    a) Singly linked list

    b) Doubly linked list

    c) Circular linked list

    d) Array implementation of linked list

    Answer: d) Array implementation of linked list
  7. Linked lists are not suitable for the implementation of ___________

    a) Insertion sort

    b) Radix sort

    c) Polynomial manipulation

    d) Binary search

    Answer: d) Binary search
  8. Linked list is considered as an example of ___________ type of memory allocation.

    a) Dynamic

    b) Static

    c) Compile time

    d) Heap

    Answer: a) Dynamic
  9. In Linked List implementation, a node carries information regarding ___________

    a) Data

    b) Link

    c) Data and Link

    d) Node

    Answer: c) Data and Link
  10. Linked list data structure offers considerable saving in _____________

    a) Computational Time

    b) Space Utilization

    c) Space Utilization and Computational Time

    d) Speed Utilization

    Answer: c) Space Utilization and Computational Time
  11. Which of the following points is/are not true about Linked List data structure when it is compared with an array?

    a) Arrays have better cache locality that can make them better in terms of performance

    b) It is easy to insert and delete elements in Linked List

    c) Random access is not allowed in a typical implementation of Linked Lists

    d) Access of elements in linked list takes less time than compared to arrays

    Answer: d) Access of elements in linked list takes less time than compared to arrays
  12. What does the following function do for a given Linked List with first node as head?
        void fun1(struct node* head) {
          if (head == NULL)
            return;
          fun1(head->next);
          printf("%d ", head->data);
        }
        

    a) Prints all nodes of linked lists

    b) Prints all nodes of linked list in reverse order

    c) Prints alternate nodes of Linked List

    d) Prints alternate nodes in reverse order

    Answer: b) Prints all nodes of linked list in reverse order
  13. Which of the following sorting algorithms can be used to sort a random linked list with minimum time complexity?

    a) Insertion Sort

    b) Quick Sort

    c) Heap Sort

    d) Merge Sort

    Answer: d) Merge Sort




 


.

Recently Updated: New Placement Papers added.
Vyom Network : Web Hosting | Dedicated Server | Free SMS, GRE, GMAT, MBA | Online Exams | Freshers Jobs | Software Downloads | Programming & Source Codes | GRE Preparation | Jobs, Discussions | Software Listing | Free eBooks | Free eBooks | Free Business Info | Interview Questions | Free Tutorials | International Business Information | IAS Preparation | Jokes, Songs, Fun | Free Classifieds | Free Recipes | FAQs | Free Downloads | Bangalore Info | Tech Solutions | Project Outsourcing, Web Hosting | GATE Preparation | MBA Preparation | SAP Info | Excellent Mobiles | Software Testing | Interview Questions | Freshers Jobs | Server Insiders | File Extension Directory

Copyright ©2003-2025 Vyom Technosoft Pvt. Ltd., All Rights Reserved. Read our Privacy Policy