1 Crore+ students have signed up on EduRev. Have you? Download the App 
Which of the following is not a keyword in python language?
Which of the following is the correct way to call a function?
What is the syntax to work with the database?
Which of the following components is/are part(s) of a function header in python?
What is the global system of interconnected computer networks called?
Syntax of the seek function in python is myfile.seek(offset, reference_point) where myfile is the file object. What is the default value of reference_point?
Read the statements given below and choose the correct answer:
Statement A: It is very difficult to organize unstructured data.
Statement B: CSV helps into organize a huge amount of data in a proper and systematic way.
Two statements are given below:
Statement I: The order of items in the output of the map() method in Python is same as the order in the input iterable.
Statement II: The order of items in the output of the map() method in Python is sorted in ascending order.
Directions: Match the contents under List I with those under List II.
In a relational schema, each tuple is divided into fields called
A ________ computer is a large and expensive computer capable of simultaneously processing data for hundreds or thousands ofusers.
Assume that the position of the file pointer is at the beginning of 3rd line in a text file. Which of the following option can be used to read all the remaining lines?
Which of the following items are present in the function header?
Given Tuple: tup1= (10, 20, 30, 40, 50, 60, 70, 80, 90)
What will be the output of print (tup1 [3:7:2])?
Identify the output of the following Python statements.
x = [[10.0, 11.0, 12.0],[13.0, 14.0, 15.0]]
y = x[1][2] print(y)
Which of the following operation easily performed by using a single stack?
Operation 1: Job Scheduling
Operation 2: Reversing the elements
Consider the following program.
def sample():
stack = []
return stack
What does the sample function return?
Consider the following infix expression. what is the prefix expression for a given infix expression?
Infix: ((8+9)*(76))
Which of the following data structure is suitable for checking Valid Parentheses?
Consider the following program.
Here stack parameter is an empty stack and the item is an element.
def sample(stack, item):
stack.append(item)
What does the sample function do?
Consider the following program. Here glass stack is an empty stack.
def check(glassStack):
if len(glassStack)==0:
return True
else:
return False
What does the check function return?
Consider the input sequence a, b, c, d.
Minimum number of operations(push or pop) required to get stack permutation for sequence b, d, c, a?
Hint:
A stack permutation is a permutation of items in the supplied input queue that is accomplished by transferring elements from the input queue to the output queue using a stack and the builtin push and pop operations.
Example 1:
Consider array has 4 elements and a searching element 16.
A[4]= {10, 16, 22, 25}
The number of iterations are required to search an element by using a binary search= T1
Example 2:
Consider array has 4 elements and a searching element 22.
A[4]= {10, 16, 22, 25}
The number of iterations are required to search an element by using a binary search= T2
Note: Searching is successful.
Which of the following statement are true?
Which statement is generally used in the beginning of the function or after a function call to check for valid input?
Which of the following is true about binary search?
Statement 1: The precondition for the binary search is that the elements must be arranged in sorted order.
Statement 2: Binary search is based on the divide and conquers approach.
Which of the following searching method is useful for unsorted arrays?
1) Linear Search
2) Binary Search
Which of the following case a linear search and worst case behaviour?
Which of the following statements are true?
Statement 1: Linear search is based on the sequential approach and binary search is based on the divide and conquer approach.
Statement 2: Binary search algorithm takes more than a linear search algorithm.
Note: The array is sorted in order.
Which of the following is true about linear search?
Statement 1: linear search is used for an unsorted and unordered small list of elements.
Statement 2: If the searching element is found in the middle of the array, linear search compares the elements till the end of the array.
Consider array has n elements and searching element X. What is the minimum and the maximum number of comparisons are required to search a element?
Note: Searching is successful.
Consider array has n elements and searching element X. What is the minimum and the maximum number of iterations are required to search an element by using binary search?
Note: Searching is successful.
Consider the following array a[ ] with n elements and searching element 16 and the linear search is comparing the elements from index n1.
a[6]= {15, 87, 20, 16, 9, 11} Here n=6
How many comparisons are required to search a searching element 16 by using linear search?
Which of the following behaviour takes smallest time in linear serach ?
Consider the array L = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]. Suppose you’re searching for the value 3 using binary search method. What is the value of the variable mid after two iterations?
Identify the improper stack permutation for the input sequence a, b, c, d?
Hint:
A stack permutation is a permutation of items in the supplied input queue that is accomplished by transferring elements from the input queue to the output queue using a stack and the builtin push and pop operations.
8 docs148 tests

8 docs148 tests
