Login
Register
Dark Mode
Brightness
Ambient Glow – Questions list
Register
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged goclasses-da-dpp
0
0 votes
2
2 answers
130
130 views
GO Classes DPP | GATE DA | Python & DSA | Binary Halving
What is the order of growth of $\texttt{foo}$ in terms of $\texttt{n}$, where $\texttt{n}$ is the length of $\texttt{lst}$?Assume that slicing a list and calling $\texttt...
GO Classes
130
views
asked
Jul 4
Algorithms
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-216
python-&-dsa
goclasses-python-&-dsa-practice-questions
+
–
1
1 vote
2
2 answers
116
116 views
GO Classes DPP | GATE DA | Python & DSA | Sorting Complexity
Select all sorting algorithms that run in worst-case cost $\text{Θ(n log n)}$.HeapSortInsertionSortMergeSortQuickSort
GO Classes
116
views
asked
Jul 4
Algorithms
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-216
python-&-dsa
goclasses-python-&-dsa-practice-questions
multiple-selects
+
–
2
2 votes
2
2 answers
122
122 views
GO Classes DPP | GATE DA | Python & DSA | Selection Passes
Selection sort works in a series of passes over an array. Choose the answer that shows how this array will appear after the first two passes of selection sort.Original ar...
GO Classes
122
views
asked
Jul 4
Algorithms
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-216
python-&-dsa
goclasses-python-&-dsa-practice-questions
+
–
1
1 vote
2
2 answers
114
114 views
GO Classes DPP | GATE DA | Python & DSA | Search Comparisons
How many comparisons will binary search be expected to perform to find one member of a list of $1000$ sorted numbers?$999$Approximately $20$Approximately $30$Approximatel...
GO Classes
114
views
asked
Jul 4
Algorithms
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-216
python-&-dsa
goclasses-python-&-dsa-practice-questions
+
–
1
1 vote
2
2 answers
146
146 views
GO Classes DPP | GATE DA | Python & DSA | Grid Jumpdown
A grid contains '$\texttt{s}$' for sand, '$\texttt{r}$' for rock, and $\texttt{None}$ for empty.The operation $\texttt{jumpdown(grid, x, n)}$ works on one column $\texttt...
GO Classes
146
views
asked
Jul 3
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-215
python-&-dsa
goclasses-python-&-dsa-practice-questions
output
list
+
–
1
1 vote
2
2 answers
123
123 views
GO Classes DPP | GATE DA | Python & DSA | 2D Indexing
Suppose $\texttt{zeroArray(3, 4)}$ creates a $2$D array with $3$ rows and $4$ columns, filled with zeros.Now consider:v = zeroArray(3, 4)Which expression correctly change...
GO Classes
123
views
asked
Jul 3
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-215
python-&-dsa
goclasses-python-&-dsa-practice-questions
output
list
+
–
2
2 votes
2
2 answers
126
126 views
GO Classes DPP | GATE DA | Python & DSA | Group By
Consider the following Python code:def group_by(s, fn): grouped = {} for x in s: key = fn(x) if key in grouped: grouped[key].append(x) else: grouped[key] = [x] return gro...
GO Classes
126
views
asked
Jul 3
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-215
python-&-dsa
goclasses-python-&-dsa-practice-questions
output
list
+
–
2
2 votes
2
2 answers
129
129 views
GO Classes DPP | GATE DA | Python & DSA | Insert Items
Consider the following Python code:def insert_items(s, before, after): index = 0 while index < len(s): if s[index] == before: s.insert(index + 1, after) index += 1 index ...
GO Classes
129
views
asked
Jul 3
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-215
python-&-dsa
goclasses-python-&-dsa-practice-questions
output
list
+
–
2
2 votes
3
3 answers
143
143 views
GO Classes DPP | GATE DA | Python & DSA | Mutating Iteration
Consider the following Python code:def remove_dups(L1, L2): for e in L1: if e in L2: L1.remove(e) L1 = [1, 2, 3, 4] L2 = [1, 2, 5, 6] remove_dups(L1, L2) print(L1)What is...
GO Classes
143
views
asked
Jul 3
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-215
python-&-dsa
goclasses-python-&-dsa-practice-questions
output
list
+
–
2
2 votes
2
2 answers
237
237 views
GO Classes DPP | GATE DA | Python & DSA | Nested Mutation
A function $\texttt{deep_map(f, s)}$ replaces every non-list element $\texttt{x}$ inside a nested list $\texttt{s}$ with $\texttt{f(x)}$.It modifies $\texttt{...
GO Classes
237
views
asked
Jul 2
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-214
python-&-dsa
goclasses-python-&-dsa-practice-questions
list
output
multiple-selects
+
–
2
2 votes
3
3 answers
220
220 views
GO Classes DPP | GATE DA | Python & DSA | List Shuffle
A function $\texttt{shuffle(s)}$ takes a sequence $\texttt{s}$ with an even number of elements. It returns a new list by interleaving the first half of $\texttt{s}$ with ...
GO Classes
220
views
asked
Jul 2
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-214
python-&-dsa
goclasses-python-&-dsa-practice-questions
array
list
output
+
–
2
2 votes
3
3 answers
174
174 views
GO Classes DPP | GATE DA | Python & DSA | Extend Append
Consider the following Python code:s = [3] s.extend([4, 5]) s.extend([s.append(9), s.append(10)]) print(s)What is the output of the code above?[3, 4, 5, 9, 10][3, 4, 5, N...
GO Classes
174
views
asked
Jul 2
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-214
python-&-dsa
goclasses-python-&-dsa-practice-questions
array
output
+
–
2
2 votes
3
3 answers
195
195 views
GO Classes DPP | GATE DA | Python & DSA | Alias Slice
Consider the following Python code:s = [9, 7, 8] a, b = s, s[:] print(a is s, b == s, b is s) print(a.pop()) print(a + b)What is the output of the code above?True True Tr...
GO Classes
195
views
asked
Jul 2
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-214
python-&-dsa
goclasses-python-&-dsa-practice-questions
output
array
+
–
2
2 votes
3
3 answers
236
236 views
GO Classes DPP | GATE DA | Python & DSA | List Mutation
Consider the following Python code:s = [6, 7, 8] print(s.append(6)) s.insert(0, 9) x = s.pop(1) s.remove(x) print(s)What is the output of the code above?None [9, 7, 8]Non...
GO Classes
236
views
asked
Jul 2
Data Structures
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-214
python-&-dsa
goclasses-python-&-dsa-practice-questions
output
+
–
6
6 votes
1
1 answer
414
414 views
GO Classes DPP | GATE DA | Python Programming | Recursive Calls
Consider the following Python code:def virfib_sq(n): print(n) if n <= 1: return n return (virfib_sq(n - 1) + virfib_sq(n - 2)) 2 r4 = virfib_sq(4)What would be the outp...
GO Classes
414
views
asked
Jul 1
Programming in Python
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-213
programming-in-python
goclasses-python-&-dsa-practice-questions
output
recursion
numerical-answers
+
–
4
4 votes
1
1 answer
238
238 views
GO Classes DPP | GATE DA | Python Programming | Call Tree
Consider the following Python code:def virfib_sq(n): print(n) if n <= 1: return n return (virfib_sq(n - 1) + virfib_sq(n - 2)) 2 r3 = virfib_sq(3)What would Python disp...
GO Classes
238
views
asked
Jul 1
Programming in Python
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-213
programming-in-python
goclasses-python-&-dsa-practice-questions
output
recursion
+
–
3
3 votes
1
1 answer
203
203 views
GO Classes DPP | GATE DA | Python Programming | Tree Recursion
Consider the following Python code:def virfib_sq(n): print(n) if n <= 1: return n return (virfib_sq(n - 1) + virfib_sq(n - 2)) 2 r2 = virfib_sq(2)What would be the outp...
GO Classes
203
views
asked
Jul 1
Programming in Python
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-213
programming-in-python
goclasses-python-&-dsa-practice-questions
output
recursion
+
–
3
3 votes
1
1 answer
199
199 views
GO Classes DPP | GATE DA | Python Programming | Base Return
Consider the following Python code:def virfib_sq(n): print(n) if n <= 1: return n return (virfib_sq(n - 1) + virfib_sq(n - 2)) 2 r1 = virfib_sq(1)What would be the outp...
GO Classes
199
views
asked
Jul 1
Programming in Python
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-213
programming-in-python
goclasses-python-&-dsa-practice-questions
output
recursion
numerical-answers
+
–
2
2 votes
1
1 answer
226
226 views
GO Classes DPP | GATE DA | Python Programming | Base Case
Consider the following Python code:def virfib_sq(n): print(n) if n <= 1: return n return (virfib_sq(n - 1) + virfib_sq(n - 2)) 2 r0 = virfib_sq(0)What would be the outp...
GO Classes
226
views
asked
Jul 1
Programming in Python
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-213
programming-in-python
goclasses-python-&-dsa-practice-questions
output
recursion
numerical-answers
+
–
2
2 votes
1
1 answer
224
224 views
GO Classes DPP | GATE DA | Python Programming | Nested List
Consider the following Python code:def total_first(t): if not t: return 0 return t[0][0] + total_first(t[1:]) data = [[2, 7], [5, 1], [3, 8], [4, 9]] print(total_first(da...
GO Classes
224
views
asked
Jun 30
Programming in Python
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-212
programming-in-python
goclasses-python-&-dsa-practice-questions
output
recursion
numerical-answers
+
–
2
2 votes
1
1 answer
178
178 views
GO Classes DPP | GATE DA | Python Programming | Reverse Print
Consider the following Python code:def show(lst, i=0): if i == len(lst): return show(lst, i + 1) if lst[i] % 2 != 0: print(lst[i], end="") show([1, 2, 3, 4, 5])What is th...
GO Classes
178
views
asked
Jun 30
Programming in Python
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-212
programming-in-python
goclasses-python-&-dsa-practice-questions
output
recursion
+
–
2
2 votes
1
1 answer
163
163 views
GO Classes DPP | GATE DA | Python Programming | List Count
Consider the following Python code:def count_greater(lst, v): if not lst: return 0 count = 1 if lst[0] v else 0 return count + count_greater(lst[1:], v) print(count_grea...
GO Classes
163
views
asked
Jun 30
Programming in Python
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-212
programming-in-python
goclasses-python-&-dsa-practice-questions
output
recursion
numerical-answers
+
–
2
2 votes
1
1 answer
162
162 views
GO Classes DPP | GATE DA | Python Programming | Digit Recursion
Consider the following Python code:def mystery(n): if n < 10: return n a = n // 10 b = n % 10 return mystery(a + b) print(mystery(678))What is the output of the code abov...
GO Classes
162
views
asked
Jun 30
Programming in Python
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-212
programming-in-python
goclasses-python-&-dsa-practice-questions
output
recursion
numerical-answers
+
–
2
2 votes
1
1 answer
165
165 views
GO Classes DPP | GATE DA | Python Programming | Base Case
Consider the following Python code:def solve(n): if n <= 0: return 0 return n + solve(n - 2) print(solve(6), solve(5))What is the output of the code above?9 1212 912 12Re...
GO Classes
165
views
asked
Jun 30
Programming in Python
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-212
programming-in-python
goclasses-python-&-dsa-practice-questions
output
recursion
+
–
3
3 votes
1
1 answer
170
170 views
GO Classes DPP | GATE DA | Python Programming | Delete Nodes
Consider the following Python code:class Node: def __init__(self, data): self.data = data self.next = None a = Node("A") b = Node("B") c = Node("C") d = Node("D") a.next ...
GO Classes
170
views
asked
Jun 29
Programming in Python
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-211
programming-in-python
goclasses-python-&-dsa-practice-questions
output
linked-list
+
–
3
3 votes
1
1 answer
147
147 views
GO Classes DPP | GATE DA | Python Programming | Insert Nodes
Consider the following Python code:class Node: def __init__(self, data): self.data = data self.next = None head = Node(20) tail = head new_first = Node(10) new_first.next...
GO Classes
147
views
asked
Jun 29
Programming in Python
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-211
programming-in-python
goclasses-python-&-dsa-practice-questions
output
linked-list
+
–
3
3 votes
1
1 answer
134
134 views
GO Classes DPP | GATE DA | Python Programming | Traversal Length
Consider the following Python code:class Node: def __init__(self, data): self.data = data self.next = None n1 = Node(5) n2 = Node(10) n3 = Node(15) n4 = Node(20) n1.next ...
GO Classes
134
views
asked
Jun 29
Programming in Python
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-211
programming-in-python
goclasses-python-&-dsa-practice-questions
output
linked-list
+
–
3
3 votes
2
2 answers
195
195 views
GO Classes DPP | GATE DA | Python Programming | Node Linking
Consider the following Python code:class Node: def __init__(self, data): self.data = data self.next = None a = Node("A") b = Node("B") c = Node("C") a.next = b b.next = c...
GO Classes
195
views
asked
Jun 29
Programming in Python
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-211
programming-in-python
goclasses-python-&-dsa-practice-questions
output
linked-list
+
–
4
4 votes
2
2 answers
178
178 views
GO Classes DPP | GATE DA | Python Programming | Node Class
Consider the following Python code:class Node: def __init__(self, value): self.value = value self.next = None n1 = Node(10) n2 = Node(20) print(n1.value, n1.next, n2.valu...
GO Classes
178
views
asked
Jun 29
Programming in Python
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-211
programming-in-python
goclasses-python-&-dsa-practice-questions
output
linked-list
+
–
3
3 votes
1
1 answer
138
138 views
GO Classes DPP | GATE DA | Python Programming | Linked Node
Consider the following Python code:class Node: def __init__(self, data): self.data = data self.next = None n1 = Node(10) n2 = Node(20) n3 = Node(30) n1.next = n2 n2.next ...
GO Classes
138
views
asked
Jun 27
Programming in Python
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-210
programming-in-python
goclasses-python-&-dsa-practice-questions
output
+
–
Page:
« prev
1
...
8
9
10
11
12
13
14
15
16
17
18
...
48
next »