Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged greedy-algorithm
11
votes
1
answer
1
GO Classes Test Series 2024 | Mock GATE | Test 13 | Question: 42
Consider the following statements related to Huffman's algorithm: $\text{S1:}$ If there is exactly one symbol with a frequency of $1 / 3$, and all other symbols have frequencies strictly less than $1 / 3$, then Huffman's algorithm may ... $\mathrm{S} 1$ is false, but $\mathrm{S} 2$ is true. S1 is false, and S2 is false.
Consider the following statements related to Huffman's algorithm:$\text{S1:}$ If there is exactly one symbol with a frequency of $1 / 3$, and all other symbols have frequ...
GO Classes
670
views
GO Classes
asked
Jan 28
Algorithms
goclasses2024-mockgate-13
goclasses
algorithms
greedy-algorithm
huffman-code
2-marks
+
–
11
votes
1
answer
2
GO Classes Test Series 2024 | Mock GATE | Test 12 | Question: 1
Consider the two statements regarding the Huffman's algorithm - $\text{S1:}$ The character with the highest probability (all probabilities are unique) is guaranteed to be one of the leaves that is closest to the root (i.e it ... $\mathrm{S} 2$ is correct Both are correct statements Both are incorrect statements
Consider the two statements regarding the Huffman's algorithm -$\text{S1:}$ The character with the highest probability (all probabilities are unique) is guaranteed to be ...
GO Classes
898
views
GO Classes
asked
Jan 21
Algorithms
goclasses2024-mockgate-12
goclasses
algorithms
greedy-algorithm
huffman-code
1-mark
+
–
0
votes
0
answers
3
Algorithm Madeeasy Workbook
As we have to select maximal set of “non overlapping” activities. So like job scheduling algo of greedy we can solve it. So according to that complexity must be O(n logn). But ans is (b). Anyone please explain.
As we have to select maximal set of “non overlapping” activities. So like job scheduling algo of greedy we can solve it. So according to that complexity must be O(n l...
Sajal Mallick
183
views
Sajal Mallick
asked
Nov 27, 2023
Algorithms
made-easy-booklet
algorithms
time-complexity
greedy-algorithm
algorithm-design
+
–
1
votes
1
answer
4
consider the following message BCCABBDDAECCBBAEDDCC find the no of bits requiered for huffman encoding of above message
consider the following message BCCABBDDAECCBBAEDDCC find the no of bits requiered for huffman encoding of above message
amrit22
672
views
amrit22
asked
Sep 24, 2023
Algorithms
algorithms
greedy-algorithm
huffman-code
+
–
2
votes
2
answers
5
Gate@Zeal Booklet
Can anyone help in solving the question 105 to 109. I don't have answer key I want to confirm my answer ...i will update my answer in the comments.
Can anyone help in solving the question 105 to 109.I don't have answer key I want to confirm my answer ...i will update my answer in the comments.
Psy Duck
969
views
Psy Duck
asked
Jun 24, 2023
Algorithms
kruskals-algorithm
greedy-algorithm
prims-algorithm
minimum-spanning-tree
zeal
zeal-workbook
+
–
3
votes
0
answers
6
TIFR CSE 2023 | Part B | Question: 3
Given a set $\mathcal{F}$ of intervals $\left(s_{i}, t_{i}\right)_{i=1}^{n}$ on the integer line (assume all $s_{i}, t_{i}$ are distinct), a subset $S$ of $\mathcal{F}$ is said to be independent if no two intervals in $S$ have a non-empty ... $\text{(C1)}$ Choices $\text{(C1)}$ and $\text{(C2)},$ but not choice $\text{(C3)}$
Given a set $\mathcal{F}$ of intervals $\left(s_{i}, t_{i}\right)_{i=1}^{n}$ on the integer line (assume all $s_{i}, t_{i}$ are distinct), a subset $S$ of $\mathcal{F}$ i...
admin
390
views
admin
asked
Mar 14, 2023
Algorithms
tifr2023
algorithms
greedy-algorithm
+
–
0
votes
1
answer
7
Which one is right ? what will be the right answer assigning 0 to the left edges or right?
Nisha Bharti
581
views
Nisha Bharti
asked
Nov 26, 2022
Algorithms
huffman-code
greedy-algorithm
algorithm-design
+
–
0
votes
1
answer
8
Applied Test Series
Consider the following items with their associated weights and values. If a knapsack of capacity 25 units of weight is available and we are allowed to take either the item completely or leave it the maximum possible profit if we follow the greedy approach by being greedy about profit is _____
Consider the following items with their associated weights and values. If a knapsack of capacity 25 units of weight is available and we are allowed to take either the ite...
LRU
1.6k
views
LRU
asked
Dec 28, 2021
Algorithms
test-series
knapsack-problem
algorithms
greedy-algorithm
+
–
0
votes
1
answer
9
Testbook Test Series
rsansiya111
329
views
rsansiya111
asked
Dec 17, 2021
Algorithms
testbook-test-series
greedy-algorithm
knapsack-problem
+
–
1
votes
2
answers
10
NIELIT 2017 July Scientist B (IT) - Section B: 60
$0/1$-Knapsack is a well known problem where, it is desired to get the maximum total profit by placing $n$ items (each item is having some weight and associated profit) into a knapsack of capacity $W$. The table given below shows the weights and associated ... $19$ $18$ $17$ $20$
$0/1$-Knapsack is a well known problem where, it is desired to get the maximum total profit by placing $n$ items (each item is having some weight and associated profit) i...
admin
2.7k
views
admin
asked
Mar 30, 2020
Algorithms
nielit2017july-scientistb-it
algorithms
greedy-algorithm
knapsack-problem
+
–
3
votes
3
answers
11
UGC NET CSE | June 2019 | Part 2 | Question: 68
Consider the following steps: $S_1$: Characterize the structure of an optimal solution $S_2$: Compute the value of an optimal solution in bottom-up fashion Which of the following step(s) is/are common to both dynamic programming and greedy algorithms? Only $S_1$ Only $S_2$ Both $S_1$ and $S_2$ Neither $S_1$ nor $S_2$
Consider the following steps:$S_1$: Characterize the structure of an optimal solution$S_2$: Compute the value of an optimal solution in bottom-up fashionWhich of the foll...
Arjun
5.6k
views
Arjun
asked
Jul 2, 2019
Algorithms
ugcnetcse-june2019-paper2
optimal-solution
dynamic-programming
greedy-algorithm
+
–
0
votes
1
answer
12
ME Test Series Question
Consider the following statements given below: S1 : If a graph contain a negative weight cycle then Dijkstra’s algorithm may or may not terminate. S2 : Bellman Ford algorithm for every weighted graph which contain two vertices u and v always produces a shortest path. Which of the above statements are incorrect? Only S1 Only S2 Both S1 and S2 None of these
Consider the following statements given below:S1 : If a graph contain a negative weight cycle then Dijkstra’s algorithm may or may not terminate.S2 : Bellman Ford algor...
Shankar Kakde
3.0k
views
Shankar Kakde
asked
Jan 25, 2019
Algorithms
made-easy-test-series
dijkstras-algorithm
bellman-ford
greedy-algorithm
+
–
4
votes
1
answer
13
GATE Overflow | Mock GATE | Test 1 | Question: 47
Which of the following statements is/are correct with respect to Djikstra Algorithm? (P) It always works perfectly for graphs with negative weight edges. (Q) It does not work perfectly for graphs with negative weight cycles. (R) It may or may not work for graphs ... , S, T and U are correct Only Q, R, T are correct Only Q, R, S, T and U are correct
Which of the following statements is/are correct with respect to Djikstra Algorithm?(P) It always works perfectly for graphs with negative weight edges.(Q) It does not wo...
Ruturaj Mohanty
1.6k
views
Ruturaj Mohanty
asked
Dec 27, 2018
Algorithms
go-mockgate-1
greedy-algorithm
dijkstras-algorithm
shortest-path
algorithms
graph-algorithms
+
–
0
votes
1
answer
14
MadeEasy Test Series: Algorithms - Minimum Spanning Trees
mitesh kumar
988
views
mitesh kumar
asked
Dec 17, 2018
Algorithms
made-easy-test-series
algorithms
greedy-algorithm
minimum-spanning-tree
numerical-answers
+
–
0
votes
2
answers
15
Fibonacci number time complexity
Consider the following code segment to find the $n^{th}$ Fibonacci number: Fib(n) { if(n==0) {return 0;} if(n==1) {return 1;} else { return(Fib(n-1) + Fib(n-2)); } } The time complexity of the above code and time complexity of the same problem solved using dynamic programming is______ $A)O(n^{2}),O(n)$ $B)O(2^{n}),O(n)$ $C)O(2^{n}),O(n^{2})$ $D)$None of the above
Consider the following code segment to find the $n^{th}$ Fibonacci number:Fib(n) { if(n==0) {return 0;} if(n==1) {return 1;} else { return(Fib(n-1) + Fib(n...
Lakshman Bhaiya
2.8k
views
Lakshman Bhaiya
asked
Nov 13, 2018
Algorithms
algorithms
greedy-algorithm
dynamic-programming
+
–
0
votes
1
answer
16
Self doubt
What is the difference between Dijkstra and Bellman Ford algorithm? Will the shortest path given by both be same in following conditions : a) All positive edge weights b) Some negative edge weights without negative edge cycle c) With negative edge cycles
What is the difference between Dijkstra and Bellman Ford algorithm?Will the shortest path given by both be same in following conditions :a) All positive edge weightsb) So...
Vipin Rai
711
views
Vipin Rai
asked
Nov 11, 2018
Algorithms
dijkstras-algorithm
bellman-ford
greedy-algorithm
descriptive
+
–
4
votes
3
answers
17
Job Sequencing Problem (Greedy Algorithm)
If job $J=(J_{1},J_{2},J_{3},J_{4})$ are given their processing time $T_{i}=(1,1,2,3)$ and deadline are $D_{i}=(3,4,2,3)$ maximum how many job can be done$?$ $A)1$ $B)2$ $C)3$ $D)All$
If job $J=(J_{1},J_{2},J_{3},J_{4})$ are given their processing time $T_{i}=(1,1,2,3)$ and deadline are $D_{i}=(3,4,2,3)$ maximum how many job can be done$?$$A)1$ ...
Lakshman Bhaiya
12.5k
views
Lakshman Bhaiya
asked
Nov 10, 2018
Algorithms
algorithms
greedy-algorithm
algorithm-design
job-scheduling
+
–
0
votes
2
answers
18
Greedy Method Algorithm
Single source shortest path problems can be implemented by greedy algorithms using A. Singly linked list B. Min heap C. AVL tree D. All of the above
Single source shortest path problems can be implemented by greedy algorithms usingA. Singly linked listB. Min heapC. AVL treeD. All of the above
Vaishnavi01
1.3k
views
Vaishnavi01
asked
Sep 25, 2018
Algorithms
greedy-algorithm
+
–
1
votes
2
answers
19
Massachusetts Institute of Technology Professors Ronald L. Rivest and Sivan Toledo
Suppose that you implement Dijkstra's algorithm using a priority queue algorithm that requires O(V ) time to initialize, worst-case f(V, E) time for each EXTRACT-MIN operation and worst-case g(V, E) time for each DECREASE- ... (worst-case) time does it take to run Dijkstra's algorithm on an input graph G = (V, E)?.
Suppose that you implement Dijkstra’s algorithm using a priority queue algorithm that requires O(V ) time to initialize, worst-case f(V, E) time for each EXTRACT-MIN op...
Rishav Kumar Singh
705
views
Rishav Kumar Singh
asked
Jul 29, 2018
Algorithms
greedy-algorithm
dijkstras-algorithm
+
–
1
votes
0
answers
20
Massachusetts Institute of Technology Professors Ronald L. Rivest and Sivan Toledo
Suppose you want to get from s to t on weighted graph G with nonnegative edge weights, but you would like to stop by u if it isn't too inconvenient. (Here too inconvenient means that it increases the length of ... It should either return the shortest path from s to t, or the shortest path from s to t containing u.
Suppose you want to get from s to t on weighted graph G with nonnegative edge weights, but you would like to stop by u if it isn’t too inconvenient. (Here too inconveni...
Rishav Kumar Singh
350
views
Rishav Kumar Singh
asked
Jul 29, 2018
Algorithms
greedy-algorithm
+
–
0
votes
0
answers
21
self doubt on HUFFMAN
in Huffman Code, we get extract the minimum at each time, but my minimum is creating duplicate, then which one i choose? i am getting the same avg.no.of bits for every Huffman tree, but the problem is my tree is changing therefore representing the character also changed, if some one asks ... $\frac{12}{30} $
in Huffman Code, we get extract the minimum at each time, but my minimum is creating duplicate, then which one i choose?i am getting the same avg.no.of bits for every Huf...
Shaik Masthan
1.3k
views
Shaik Masthan
asked
Jul 26, 2018
Algorithms
greedy-algorithm
huffman-code
+
–
Page:
1
2
3
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register