0xDebug - Python
Quiz
•
Computers
•
University
•
Hard
Suresh King
Used 5+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The following Code snippet for the function hasCycle, uses hare-tortoise algorithm for detecting cycle in linked list. Read through the code carefully and select the option that is suitable.
There is no issue in the code; it will execute successfully
The ‘while’ condition must be improved by adding some condition
Updating ‘hare’ pointer will directly affect ‘tortoise’ pointer
Line 9 must be updated by “if tortoise == hare”
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The code snippet uses binary search algorithm to check if a value is present in the given list. Identify the options true to make the below code to follow binary search algorithm.
To make this code “binary search” work properly the recursion has to be done with proper parameters. Consider the complexityConsider the format: “ Change at Line 8 | Change at Line 10 “
search(a, mid + 1, last, item) | search(a, start, mid – 1, item)
search(a, start, mid – 1, item) | search(a, mid + 1, last, item)
search(a, start, mid, item) | search(a, mid, last, item)
search(a, mid + 1, last, item) | search(a, start, mid, item)
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The below question is to check, can we able to reach the last element of the array by starting from 0th index of the array. The index has to be incremented by value in that index position. N is the length of the array. ‘arr_step_count’ array contains values (step count) ranging from 0 <= step_count <= ∞
Is there any possibilities for infinite loop in any case of input list whose element value ranges from 0 <= element_value <= ∞
Yes
No
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The given code is the solution for finding a number is a palindrome or not.
To make the above code work properly, how many changes has to be made:
No error
Three
Two
One
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Read through the following code for Linked List reversal with the following functions.
What must be the order of the lines inside the while loop must follow, to reverse the linked list.
13, 12, 15, 14
14, 12, 15, 13
12, 15, 14, 13
15, 14, 13, 12
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Select the Logical Error in the following Code Snippet for the function multiply_matrices.
There is no error
Array A is accessed wrongly
Array B is accessed wrongly
Array result is accessed wrongly
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Choose the correct output for the below code snippet
2
1
Runtime Exception of Arithmetic Exception
Compilation error due to divisibility by 0
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
15 questions
Computer and Other Human Inventions
Quiz
•
University
15 questions
Robotics Prelim
Quiz
•
University
11 questions
SCM and Logistics
Quiz
•
University
15 questions
UIT 2221 MALWARE (COPTPA)
Quiz
•
University
10 questions
UTILITY PROGRAM
Quiz
•
University
10 questions
Data Warehouse - Foundations
Quiz
•
University
7 questions
Data mining-Clustering-1
Quiz
•
University
15 questions
GIS Unit III
Quiz
•
University
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
6 questions
FOREST Self-Discipline
Lesson
•
1st - 5th Grade
7 questions
Veteran's Day
Interactive video
•
3rd Grade
20 questions
Weekly Prefix check #2
Quiz
•
4th - 7th Grade
Discover more resources for Computers
7 questions
Different Types of Energy
Interactive video
•
4th Grade - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
25 questions
Waves-8th Grade Physical Science
Quiz
•
KG - University
41 questions
Unit 8 Key Terms
Quiz
•
11th Grade - University
10 questions
Product & Quotient Derivative Rules
Quiz
•
University
5 questions
How to Calculate Force - Newton's 2nd Law of Motion
Interactive video
•
10th Grade - University
10 questions
Dichotomous Key
Quiz
•
KG - University
