Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Webpage for Algorithms
Recent questions tagged algorithms
536
views
2
answers
0
votes
made easy gate cs question bank
What will be the output printed for find(4)? void find(int x) { static int i = 10, y = 0; y = y + i; for(i; i>0; i = i - 10) { if(x! = 0) find(x – 1); else printf(“%d”, y); } }
rohitkaushal1
536
views
rohitkaushal1
asked
Sep 22, 2022
Programming in C
algorithms
programming-in-c
loop
+
–
452
views
1
answers
2
votes
PhD Admissions Written Test (Basic)
Let A be an array containing n integers. It is required to find 3 indices i, j, k such that i < j < k and either A[i] ≤ A[j] ≤ A[ ... of the fastest algorithm for this problem, assuming the array is already available, is Θ(_____________).
rsansiya111
452
views
rsansiya111
asked
Sep 11, 2022
Others
data-structures
algorithms
+
–
466
views
1
answers
0
votes
Data structures and algorithms
Assume Two-Dimensional Sorted Array (TDSA) is a two-dimensionalmatrix of size n n such as the elements in the matrix are sortedrow-wise and column-wise. For ... of a dimensionn n into TDSA. Analyse the running time of the algorithm.
Karthi2003
466
views
Karthi2003
asked
Sep 9, 2022
DS
algorithms
sorting
time-complexity
+
–
373
views
0
answers
0
votes
Data structures and algorithms
Compute the running time for the following algorithmALGORITHM RKU(a,k,n)//Input: a is an array of n element and k is a value{if( k == n) then{WRITE(a[1:n]);return 0;}else{for i ← k to n ... t;RKU(a, k+1, n);t ← a[k];a[k] ← a[i];a[i] ← t;}}
Karthi2003
373
views
Karthi2003
asked
Sep 9, 2022
DS
algorithms
time-complexity
+
–
692
views
1
answers
0
votes
Algorithms
Given ‘N’ objects, which are coloured as red, white and blue. Sort theseobjects so that objects of the same colour are adjacent, with the coloursin the order red, white and blue. Design an algorithm with a time com-plexity of O(nlog n)
Karthi2003
692
views
Karthi2003
asked
Sep 9, 2022
DS
algorithms
sorting
time-complexity
+
–
551
views
0
answers
0
votes
Time complexity
1. for ( i = 1 ; i <= n ; i++){ for ( j= 1 ; j <= i; j++){ for ( k = 1 ; k <= j ; k++) cout<<"a";}} Here , ... was formed , first term = 1 = 2^0 , last term was 2^n so sum is 2^(n+1) which gives complexity as 2^n)
Ferox
551
views
Ferox
asked
Sep 8, 2022
Algorithms
algorithms
time-complexity
+
–
949
views
1
answers
1
votes
TIFR CSE 2022 | Part B | Question: 3
Consider the problem of sorting $n$ single digit integers (base $10$). This problem can be solved in time$O(n \log n)$ but not $O(n \log \log n)$ ... $O(n / \log \log n)$None of the above.
admin
949
views
admin
asked
Sep 1, 2022
Algorithms
tifr2022
algorithms
sorting
time-complexity
+
–
748
views
1
answers
1
votes
TIFR CSE 2022 | Part B | Question: 4
Consider the following algorithm for computing the factorial of a positive integer $n$, specified in binary:prod ← 1 for i from 1 to n prod ← prod i output prodAssume ... $\omega\left(n^2\right) $None of the above
admin
748
views
admin
asked
Sep 1, 2022
Algorithms
tifr2022
algorithms
identify-function
time-complexity
+
–
Page:
« prev
1
...
8
9
10
11
12
13
14
15
16
17
18
...
118
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register