
DSA + System design - 10

Quiz
•
Computers
•
Professional Development
•
Hard
Puneet Kansal
Used 1+ times
FREE Resource
12 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Given a linked list, how can you detect if it contains a cycle?
Use a hash table to store visited nodes
Use two pointers, one moving twice as fast as the other
Use a counter to count nodes
Traverse the Linkedlist till Null not found
2.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
How do you reverse a singly linked list in O(n) time?
Swap the values of nodes starting from the two ends
Change the next pointers of each node to point to the previous node
Use a stack to store all nodes and then pop them
Use recursion to reach end node and then link back to previous nodes while rolling back
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
How do you merge two sorted linked lists into a single sorted linked list?
Concatenate the lists and sort the resulting list
Use a priority queue
Traverse both lists and merge them using a dummy node
Use a hash table to store elements
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the best way to remove duplicates from an unsorted linked list?
Sort the list and remove duplicates
Use a hash table to track seen elements
Compare each element with every other element
Use a stack to track duplicates
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
How do you check if a linked list is a palindrome?
Reverse the list and compare with the original
Use a stack to compare the first half with the second half
Recurse till last node then compare back nodes with front nodes
All of the above
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
How do you delete a node from a singly linked list given only a pointer to that node?
Copy data from the next node and delete the next node
Traverse the list to find the previous node and delete the current node
Mark the node as deleted without removing it
Not possible without head pointer
7.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
How can you determine if two singly linked lists intersect?
Compare each node of one list with each node of the other
Use a hash table to store nodes of one list and check against the other
Find the lengths of both lists and compare the tails
None of the above
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
TTPLT Token Development

Quiz
•
Professional Development
11 questions
MB-910_Módulo 2

Quiz
•
Professional Development
15 questions
Data Structures and Algorithms Quiz2

Quiz
•
Professional Development
14 questions
dddDynamic ...

Quiz
•
Professional Development
10 questions
ADS QUIZ FOR MECH1

Quiz
•
Professional Development
10 questions
VerseInnovation-AKS_Quiz

Quiz
•
Professional Development
10 questions
Módulo 2

Quiz
•
Professional Development
15 questions
Basic CSS

Quiz
•
Professional Development
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
11 questions
All about me

Quiz
•
Professional Development
10 questions
How to Email your Teacher

Quiz
•
Professional Development
15 questions
Fun Random Trivia

Quiz
•
Professional Development
22 questions
Anne Bradstreet 1612-1672

Quiz
•
Professional Development
18 questions
Spanish Speaking Countries and Capitals

Quiz
•
KG - Professional Dev...
14 questions
Fall Trivia

Quiz
•
11th Grade - Professi...
15 questions
Disney Characters Quiz

Quiz
•
Professional Development
15 questions
Quiz to Highlight Q types & other great features in Wayground

Quiz
•
Professional Development