Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Webpage for Algorithms
Recent questions tagged algorithms
0
votes
1
answer
91
TS
$\text{Please explain True or False and Why ?}$ $\text{1. f(n) = O(f(n/2))}$ $\text{2. f(n) = O($f(n)^{2}$) }$
$\text{Please explain True or False and Why ?}$$\text{1. f(n) = O(f(n/2))}$$\text{2. f(n) = O($f(n)^{2}$) }$
Jiten008
259
views
Jiten008
asked
Dec 2, 2023
Algorithms
algorithms
time-complexity
asymptotic-notation
functions
+
–
1
votes
1
answer
92
algorithm time complexity madeeasy
Consider the problem that given a set Sof n integers and another integer x, whether or not there exist two elements in S whose sum is exactly x. What is the worst case time complexity for the most efficient algorithm which solves the given problem? Is not it work like subset sum problem in dynamic programming? Then complexity should be O(n^2). How O(n logn)?
Consider the problem that given a set Sof n integers and another integer x, whether or not there exist two elements in S whose sum is exactly x. What is the worst case ti...
Sajal Mallick
511
views
Sajal Mallick
asked
Nov 28, 2023
Algorithms
algorithms
time-complexity
made-easy-test-series
made-easy-booklet
+
–
0
votes
0
answers
93
algorithm time complexity madeeasy ots
What will be the complexity?
What will be the complexity?
Sajal Mallick
191
views
Sajal Mallick
asked
Nov 28, 2023
Algorithms
algorithms
time-complexity
made-easy-test-series
made-easy-booklet
job
scheduling
+
–
0
votes
0
answers
94
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
192
views
Sajal Mallick
asked
Nov 27, 2023
Algorithms
made-easy-booklet
algorithms
time-complexity
greedy-algorithm
algorithm-design
+
–
0
votes
0
answers
95
Michael Sipster Decidability Problems
Prove L = {F | F is a boolean formula and F evaluates to true on every asignment" is decidable (include algorithm and running time in big o notation)
Prove L = {F | F is a boolean formula and F evaluates to true on every asignment" is decidable (include algorithm and running time in big o notation)
baofbuiafbi
149
views
baofbuiafbi
asked
Nov 14, 2023
Theory of Computation
theory-of-computation
michael-sipser
algorithms
+
–
0
votes
1
answer
96
Consider the following algorithm for Build-Max-heap and the given array A=[ 47, 96, 35, 54, 77, 65, 83]. Run this algorithm on the given array and redraw the heap and the heap- array whenever the swapping takes place. dry run this statement
Consider the following algorithm for Build-Max-heap and the given array A=[ 47,96, 35, 54, 77, 65, 83]. Run this algorithm on the given array and redraw the heap and the ...
syedasafoora
251
views
syedasafoora
asked
Nov 8, 2023
Algorithms
algorithms
binary-heap
+
–
2
votes
1
answer
97
#dsa #DataScienceAndAI #Python #Algorithms #DataStructures
When it comes to Gate Data Science and AI, what language will the DSA questions be asked in - Python or C language?
When it comes to Gate Data Science and AI, what language will the DSA questions be asked in - Python or C language?
divinedrug
290
views
divinedrug
asked
Oct 27, 2023
Programming in C
algorithms
data-structures
+
–
0
votes
0
answers
98
Self Doubt
It is always true that Recursive code is easier to debug?? If yes then why?? please give full explanation.
It is always true that Recursive code is easier to debug?? If yes then why?? please give full explanation.
gateexplore
131
views
gateexplore
asked
Oct 25, 2023
Algorithms
self-doubt
algorithms
+
–
2
votes
2
answers
99
Self doubt
How $O(n)+O(n)+O(n)+O(n)+O(n)+….+O(n)=O(n^2)$ but $\neq O(n)$ please explain it.
How $O(n)+O(n)+O(n)+O(n)+O(n)+….+O(n)=O(n^2)$ but $\neq O(n)$please explain it.
राजकुमारी विसर्पी
410
views
राजकुमारी विसर्पी
asked
Oct 17, 2023
Algorithms
algorithms
asymptotic-notation
self-doubt
+
–
1
votes
0
answers
100
algorithms
An element in an array X is called a leader if it is greater than all elements to the right of it in X. The best algorithm to find all leaders in an array Solves it in linear time using a left to right pass of the array Solves in linear time using a right to left pass of the array Solves it using divide and conquer in time θ(nlogn) Solves it in time θ(n^2) answer given is a bt how?
An element in an array X is called a leader if it is greater than all elements to the right of it in X. The best algorithm to find all leaders in an arraySolves it in lin...
24aaaa23
202
views
24aaaa23
asked
Oct 4, 2023
Algorithms
algorithms
+
–
1
votes
0
answers
101
algorithms
Consider a complete weighted undirected graph G(V, E), where V is the set of all vertices and E is the set of all edges in G. |V| and |E| are the number of vertices and number of edges respectively in G. Let weights of the edges in G are assigned from N (the set of natural numbers). Consider the cost of the ... 2 ) 2.W - ( |E| - 2 ) 3.W - ( |E| - 1 ) 4.W - ( |V| - 1 ) ans is 1 bt how?
Consider a complete weighted undirected graph G(V, E), where V is the set of all vertices and E is the set of all edges in G. |V| and |E| are the number of vertices and n...
24aaaa23
283
views
24aaaa23
asked
Oct 3, 2023
Algorithms
algorithms
graph-algorithms
minimum-spanning-tree
+
–
0
votes
1
answer
102
bfs dfs
Which of the following statements is/are correct? Consider 'n' as the number of nodes in graph. A.In an unweighted, undirected connected graph, Dijkstra's algorithm can be used to compute shortest path from node S to all the other vertices. B.Bellman's ... of vertices and adjacency matrix is theta(n^2) D.The time complexity of Bellman's ford algorithm is always theta(n^3)
Which of the following statements is/are correct?Consider 'n' as the number of nodes in graph.A.In an unweighted, undirected connected graph, Dijkstra’s algorithm can b...
24aaaa23
242
views
24aaaa23
asked
Oct 2, 2023
Algorithms
algorithms
bellman-ford
time-complexity
+
–
0
votes
1
answer
103
GATE: Algorithms (Source: StackOverflow)
rajishu07
264
views
rajishu07
asked
Oct 1, 2023
Algorithms
algorithms
recurrence-relation
+
–
0
votes
1
answer
104
data structure
Consider a lower triangular matrix stored in row major order as p[-25 - - + 749][-25 - - - + 749] with base address = 6800, size of each element = 6 byte. Find the value at location p[658][596]?
Consider a lower triangular matrix stored in row major order as p[-25 - - + 749][-25 - - - + 749] with base address = 6800, size of each element = 6 byte. Find the value ...
deepak_8404
292
views
deepak_8404
asked
Oct 1, 2023
Programming in C
data-structures
algorithms
made-easy-test-series
+
–
Page:
« prev
1
2
3
4
5
6
7
8
9
...
118
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register