Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Webpage for Algorithms
Recent questions tagged algorithms
238
views
1
answers
0
votes
#Prims Algorithm
Çșȇ ʛấẗẻ
238
views
Çșȇ ʛấẗẻ
asked
Jun 10, 2023
Algorithms
algorithms
+
–
1.1k
views
2
answers
3
votes
In QuickSort algorithm, which of the following statements is NOT true regarding the partition process?
In QuickSort algorithm, which of the following statements is NOT true regarding the partition process?a) Partition always divides the array into two non-empty subsets ... is already sorted, partitioning can be done in O(1) time complexity.
dhruba
1.1k
views
dhruba
asked
Jun 5, 2023
Algorithms
algorithms
quick-sort
time-complexity
array
+
–
507
views
1
answers
0
votes
Consider performing QuickSort on an array of n distinct elements. What is the probability that no comparisons will be made between the smallest and largest element?
Consider performing QuickSort on an array of n distinct elements. What is the probability that no comparisons will be made between the smallest and largest element?a. 1/nb. 1/(n-1)c. 2/nd. 2/(n-1)Answer: d. 2/(n-1)
dhruba
507
views
dhruba
asked
Jun 5, 2023
Algorithms
algorithms
quick-sort
probability
+
–
682
views
1
answers
1
votes
Suppose a BST is converted into an AVL tree. Which of the following statements is correct?
Suppose a BST is converted into an AVL tree. Which of the following statements is correct?a. The in-order traversal of the AVL tree and the BST will be the same.b. ... of the AVL tree and the BST will be the same.d. None of the above.
dhruba
682
views
dhruba
asked
Jun 5, 2023
Algorithms
algorithms
binary-search-tree
avl-tree
+
–
1.3k
views
2
answers
0
votes
Binary search is performed on a sorted array of n elements. The search key is not in the array and falls between the elements at positions m and m+1 (where 1 ≤ m < n). How many comparisons are needed in the worst case scenario to determine that the key is not in the array?
Binary search is performed on a sorted array of n elements. The search key is not in the array and falls between the elements at positions m and m+1 (where 1 ≤ m < n). How ... . ceil(log(n))b. floor(log(n))c. ceil(log(m))d. floor(log(m))
dhruba
1.3k
views
dhruba
asked
Jun 5, 2023
Algorithms
algorithms
binary-search
sorting
+
–
530
views
2
answers
1
votes
Output Of C Program
#include<stdio.h>int main(){ int x,sum; sum=0; for(x=0;x<=500;x+=10){ sum=sum+x; } printf("%d",sum); ... on computer is 12750.But i want explanation about How for loop is running and what is behaviour of sum value ?
ShubhamMeher
530
views
ShubhamMeher
asked
Jun 1, 2023
Algorithms
algorithms
programming-in-c
+
–
529
views
1
answers
0
votes
Consider a divide and conquer algorithm that divides an input of size n into a subproblems, each of size n/b, and the cost of dividing and merging the problems is given by f(n) = Θ(n^c). The Master Theorem classifies this into different cases based on the value of c in relation to log_b(a). Could you explain the intuition and reasoning behind these classifications?
Consider a divide and conquer algorithm that divides an input of size n into a subproblems, each of size n/b, and the cost of dividing and merging ... to log_b(a). Could you explain the intuition and reasoning behind these classifications?
dhruba
529
views
dhruba
asked
May 29, 2023
Algorithms
algorithms
time-complexity
divide-and-conquer
+
–
675
views
1
answers
0
votes
UGCNET CSE December 2022: 28
Consider the Graph below:How many spanning trees can be found?$10$5$9$8$(Option $1 [39409]) 1$(Option $2[39410]) 2$(Option $3 [39411]) 3$(Option $4 [39412]) 4$Answer Given by Candidate : $2$
admin
675
views
admin
asked
May 20, 2023
Algorithms
ugcnetcse-dec2022
algorithms
minimum-spanning-tree
+
–
318
views
0
answers
0
votes
Algorithm
Çșȇ ʛấẗẻ
318
views
Çșȇ ʛấẗẻ
asked
May 11, 2023
Algorithms
algorithms
time-complexity
sorting
+
–
715
views
2
answers
0
votes
Sort the following array using quicksort algorithm. [40,11,4,72,17,2,49]
Sort the following array using quicksort algorithm. [40,11,4,72,17,2,49]
Ajink123
715
views
Ajink123
asked
May 10, 2023
Algorithms
algorithms
quick-sort
+
–
297
views
1
answers
1
votes
GO Classes 2024 | IIITH Mock Test 5 | Question: 13
Let $\text{G = (V, E)}$ be a connected, undirected graph with edge weights $w: \text{E} \rightarrow \mathbb{Z}$. Suppose $\text{G}$ has a ... no cycles$\text{G}$ contains at most one cycleAll edge weights are differentNone of the above
GO Classes
297
views
GO Classes
asked
Apr 30, 2023
Algorithms
goclasses2024-iiith-mock-5
goclasses
algorithms
minimum-spanning-tree
1-mark
+
–
320
views
1
answers
3
votes
GO Classes 2024 | IIITH Mock Test 5 | Question: 15
Let $n$ be a positive integer.Consider the two statements below:$\text{S1:}$ If $f(n)>g(n)$ for all $n$ then $g(n)$ ... is incorrect$\text{S1}$ is incorrect but $\mathrm{S} 2$ is correctBoth are correctBoth are incorrect
GO Classes
320
views
GO Classes
asked
Apr 30, 2023
Algorithms
goclasses2024-iiith-mock-5
goclasses
algorithms
asymptotic-notation
1-mark
+
–
Page:
« prev
1
2
3
4
5
6
7
8
9
10
11
12
...
118
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register