Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
Webpage for Algorithms
Recent questions tagged algorithms
0
votes
0
answers
1
Apriori Algorithm
Consider a Big Bazar scenario where the product set is P = {Rice, Pulse, Oil, Milk, Apple}. The database comprises six transactions where 1 represents the presence of the product and 0 represents the absence of the product. Transaction ID Rice Pulse Oil MIlk Apple t1 1 1 1 0 0 ... t4 1 1 0 1 0 t5 1 1 1 0 1 t6 1 1 1 1 1 Apply Apriori Algorithm and find support, confidence and lift.
rahulkarmakar2002
asked
in
Data Mining and Warehousing
1 hour
ago
by
rahulkarmakar2002
6
views
data-mining
algorithms
0
votes
0
answers
2
Recurrence relation
What is the returned value by the given function below. Algo fun(n) { If(x<=2) return 1; Else { Return fun(n1/2) + n; } } Note : Assume that all the syntax and data type constraints are valid and just check algorithm.
jenilS7
asked
in
Algorithms
1 day
ago
by
jenilS7
19
views
recurrence-relation
algorithms
sequence-series
0
votes
0
answers
3
Merge Sort
Calculate the minimum and maximum number of element comparisons involved in 2 way merge sort assuming n is power of 2.
Ujjal Das
asked
in
Algorithms
1 day
ago
by
Ujjal Das
39
views
algorithms
merge-sort
0
votes
0
answers
4
Prove that n! = Ω(n^100)
wtquevb123
asked
in
Algorithms
4 days
ago
by
wtquevb123
31
views
theory-of-computation
algorithms
time-complexity
0
votes
1
answer
5
Sorting Algorithm
For flag based approach in Bubble sort we can check first by a flag if the list is sorted or not in O(n), and if it is sorted, then no need to sort and the operation ends in Best case = O(n). Why isn't the same concept applicable to selection sort? Why it never comes down from O(n$^2$)?
Mrityudoot
asked
in
Algorithms
Mar 7
by
Mrityudoot
93
views
algorithms
sorting
time-complexity
asymptotic-notation
0
votes
1
answer
6
#algorithm
how many spanning trees are possible for complete graph of 4 vertices
Amoljadhav
asked
in
Algorithms
Mar 1
by
Amoljadhav
80
views
algorithms
data-structures
graph-theory
0
votes
1
answer
7
Linked List
How can we find the highest element in a singly linked list in O(1)? We are free to use any extra space.
Mrityudoot
asked
in
Programming in C
Feb 25
by
Mrityudoot
125
views
linked-list
data-structures
algorithms
0
votes
0
answers
8
In rural Ireland, a century ago, the students had to form a line. The student at the front of the line would be asked to spell a word. If he spelled it correctly, he was allowed to sit down. If not, he received a whack on the hand with a switch and was sent to the end of the line. Suppose that a student could spell correctly 70% of the words in the lesson. What is the probability that the student would be able to sit down before receiving four whacks on the hand? Assume that the master chose the words to be spelled randomly and independently.
tim20
asked
in
Algorithms
Feb 23
by
tim20
58
views
algorithms
probability
0
votes
2
answers
9
GATE DS&AI 2024 | Question: 6
Match the items in Column $1$ with the items in Column $2$ in the following table: \begin{array}{|ll|ll|} \hline & \text{Column 1} & & \text{Column 2} \\ \hline & & & \\ \text{(p)} & \text{First In First Out} & \text{ ... $(\mathrm{p})-(\mathrm{i}),(\mathrm{q})-(\mathrm{iii}),(\mathrm{r})-(\mathrm{ii})$
Arjun
asked
in
Algorithms
Feb 17
by
Arjun
734
views
gate-ds-ai-2024
algorithms
match-the-following
0
votes
3
answers
10
GATE DS&AI 2024 | Question: 20
Consider sorting the following array of integers in ascending order using an inplace Quicksort algorithm that uses the last element as the pivot. \begin{array}{|l|l|l|l|l|} \hline 60 & 70 & 80 & 90 & 100 \\ \hline \end{array} The minimum number of swaps performed during this Quicksort is $\_\_\_\_\_\_\_\_$.
Arjun
asked
in
Algorithms
Feb 17
by
Arjun
1.1k
views
gate-ds-ai-2024
numerical-answers
algorithms
quick-sort
0
votes
1
answer
11
GATE DS&AI 2024 | Question: 30
Let $F(n)$ denote the maximum number of comparisons made while searching for an entry in a sorted array of size $n$ using binary search. Which ONE of the following options is TRUE? $F(n)=F(\lfloor n / 2\rfloor)+1$ $F(n)=F(\lfloor n / 2\rfloor)+F(\lceil n / 2\rceil)$ ... $F(n)=F(\lfloor n / 2\rfloor)$ $F(n)=F(n-1)+1$
Arjun
asked
in
Algorithms
Feb 17
by
Arjun
752
views
gate-ds-ai-2024
algorithms
binary-search
0
votes
1
answer
12
GATE DS&AI 2024 | Question: 35
Consider the following sorting algorithms: (i) Bubble sort (ii) Insertion sort (iii) Selection sort Which ONE among the following choices of sorting algorithms sorts the numbers in the array $[4,3,2,1,5]$ in increasing order after exactly two passes over the array? ... after exactly two passes over the array? (i) only (iii) only (i) and (iii) only (ii) and (iii) only
Arjun
asked
in
Algorithms
Feb 17
by
Arjun
772
views
gate-ds-ai-2024
algorithms
sorting
0
votes
1
answer
13
GATE DS&AI 2024 | Question: 41
Consider the directed acyclic graph (DAG) below: Which of the following is/are valid vertex orderings that can be obtained from a topological sort of the DAG? P Q R S T U V P R Q V SUT P Q R S V U T P R Q S V T U Consider the directed acyclic graph (DAG) below: Which of the ... from a topological sort of the DAG? P Q R S T U V P R Q V SUT P Q R S V U T P R Q S V T U
Arjun
asked
in
Algorithms
Feb 17
by
Arjun
648
views
gate-ds-ai-2024
algorithms
topological-sort
directed-acyclic-graph
2
votes
4
answers
14
GATE CSE 2024 | Set 2 | Question: 5
Let $\text{T(n)}$ be the recurrence relation defined as follows: \[ \begin{array}{l} T(0)=1, \\ T(1)=2, \text { and } \\ T(n)=5 T(n-1)-6 T(n-2) \text { for } n \geq 2 \end{array} \] Which one of the following statements is TRUE? $T(n)=\Theta\left(2^{n}\right)$ $T(n)=\Theta\left(n 2^{n}\right)$ $T(n)=\Theta\left(3^{n}\right)$ $T(n)=\Theta\left(n 3^{n}\right)$
Arjun
asked
in
Algorithms
Feb 16
by
Arjun
2.0k
views
gatecse2024-set2
algorithms
recurrence-relation
asymptotic-notation
1
vote
2
answers
15
GATE CSE 2024 | Set 2 | Question: 25
Let $\text{A}$ be an array containing integer values. The distance of $\text{A}$ is defined as the minimum number of elements in $\text{A}$ that must be replaced with another integer so that the resulting array is sorted in non-decreasing order. The distance of the array $[2,5,3,1,4,2,6]$ is ___________.
Arjun
asked
in
Algorithms
Feb 16
by
Arjun
1.8k
views
gatecse2024-set2
numerical-answers
algorithms
sorting
1
vote
1
answer
16
GATE CSE 2024 | Set 2 | Question: 29
You are given a set $V$ of distinct integers. A binary search tree $T$ is created by inserting all elements of $V$ one by one, starting with an empty tree. The tree $T$ follows the convention that, at each node, all values ... determined from $V$ Preorder traversal of $T$ can be determined from $V$ Postorder traversal of $T$ can be determined from $V$
Arjun
asked
in
Algorithms
Feb 16
by
Arjun
1.7k
views
gatecse2024-set2
algorithms
1
vote
2
answers
17
GATE CSE 2024 | Set 2 | Question: 41
Let $\text{G}$ be an undirected connected graph in which every edge has a positive integer weight. Suppose that every spanning tree in $\text{G}$ has even weight. Which of the following statements is/are TRUE for every such graph $\text{G}$ ... $\text{C}$ have even weight $\text{OR}$ all edges in $\text{C}$ have odd weight
Arjun
asked
in
Algorithms
Feb 16
by
Arjun
1.7k
views
gatecse2024-set2
algorithms
multiple-selects
1
vote
1
answer
18
GATE CSE 2024 | Set 2 | Question: 49
The number of distinct minimum-weight spanning trees of the following graph is
Arjun
asked
in
Algorithms
Feb 16
by
Arjun
1.5k
views
gatecse2024-set2
numerical-answers
algorithms
minimum-spanning-tree
0
votes
1
answer
19
GATE CSE 2024 | Set 1 | Question: 7
Given an integer array of size $N$, we want to check if the array is sorted (in either ascending or descending order). An algorithm solves this problem by making a single pass through the array and comparing each element of the array only with its adjacent elements. The ... $\Omega(N)$ but not $\mathrm{O}(N)$ neither $\mathrm{O}(N)$ nor $\Omega(N)$
Arjun
asked
in
Algorithms
Feb 16
by
Arjun
2.8k
views
gatecse2024-set1
algorithms
time-complexity
1
vote
1
answer
20
GATE CSE 2024 | Set 1 | Question: 24
The number of spanning trees in a complete graph of $4$ vertices labelled $\text{A, B, C,}$ and $\text{D}$ is _________.
Arjun
asked
in
Algorithms
Feb 16
by
Arjun
1.5k
views
gatecse2024-set1
numerical-answers
algorithms
0
votes
1
answer
21
GATE CSE 2024 | Set 1 | Question: 31
An array $[82,101,90,11,111,75,33,131,44,93]$ is heapified. Which one of the following options represents the first three elements in the heapified array? $82,90,101$ $82,11,93$ $131,11,93$ $131,111,90$
Arjun
asked
in
Algorithms
Feb 16
by
Arjun
2.0k
views
gatecse2024-set1
algorithms
1
vote
3
answers
22
GATE CSE 2024 | Set 1 | Question: 32
Consider the following recurrence relation: $T(n)=\left\{\begin{array}{c}\sqrt{n} T(\sqrt{n})+n \text { for } n \geq 1, \\ 1 \quad \text { for } n=1\end{array}\right.$ Which one of the following options is CORRECT? $T(n)=\Theta(n \log \log n)$ $T(n)=\Theta(n \log n)$ $T(n)=\Theta\left(n^2 \log n\right)$ $T(n)=\Theta\left(n^2 \log \log n\right)$
Arjun
asked
in
Algorithms
Feb 16
by
Arjun
1.8k
views
gatecse2024-set1
algorithms
4
votes
2
answers
23
GATE CSE 2024 | Set 1 | Question: 35
Let $G$ be a directed graph and $T$ a depth first search $\text{(DFS)}$ spanning tree in $G$ that is rooted at a vertex $v$. Suppose $T$ is also a breadth first search $\text{(BFS)}$ tree in $G$, rooted at $v$. Which of the following ... the tree $T$ There are no forward-edge in $G$ with respect to the tree $T$ The only edges in $G$ are the edges in $T$
Arjun
asked
in
Algorithms
Feb 16
by
Arjun
3.0k
views
gatecse2024-set1
algorithms
multiple-selects
0
votes
0
answers
24
GATE 2024
Consider an n element array which is to be sorted either in ascending or descending order. The given restriction is only one pass will be used for completely sorting the array and an element can compare with only it's adjacent pair. What will be the worst time complexity? Is this related to bubble sort algorithm or not?
TusharRana
asked
in
Algorithms
Feb 11
by
TusharRana
329
views
algorithms
sorting
5
votes
1
answer
25
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 17
Consider the following function. If $n$ and $\mathrm{k}$ are positive integers, then the least value of $\mathrm{k}$ such that $\mathrm{f}(\mathrm{k})>n$ is approximately $\log _2\left(\log _2 n\right)$ $\log _2 n$ $n \log _2 n$ $2^n$
GO Classes
asked
in
Algorithms
Feb 5
by
GO Classes
434
views
goclasses2024-mockgate-14
algorithms
identify-function
time-complexity
1-mark
4
votes
2
answers
26
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 18
Bob writes down a number between 1 and 1,000. Mary must identify that number by asking "yes/no" questions of Bob. Mary knows that Bob always tells the truth. If Mary uses an optimal strategy then she will determine that answer at the end of exactly how many questions on the worst case? 999 500 32 10
GO Classes
asked
in
Algorithms
Feb 5
by
GO Classes
392
views
goclasses2024-mockgate-14
algorithms
binary-search
1-mark
4
votes
1
answer
27
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 19
Which of the following frequencies for A,B,C and D can generate the following Huffman tree? (Select all that apply.) $p_A=0.4, p_B=0.3, p_C=0.2, p_D=0.1$ $p_A=0.35, p_B=0.25, p_C=0.2, p_D=0.2$ $p_A=0.25, p_B=0.25, p_C=0.25, p_D=0.25$ $p_A=0.2, p_B=0.35, p_C=0.2, p_D=0.25$
GO Classes
asked
in
Algorithms
Feb 5
by
GO Classes
393
views
goclasses2024-mockgate-14
algorithms
huffman-code
multiple-selects
1-mark
2
votes
2
answers
28
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 20
Consider the following array$: [32, 33, 5, 2, 14, -4, 22, 39, 34, -9].$ ... sorting algorithms could we possibly have applied? Merge sort (top-down approach) Bubble sort Quicksort (Using First element as pivot) Insertion sort
GO Classes
asked
in
Algorithms
Feb 5
by
GO Classes
483
views
goclasses2024-mockgate-14
algorithms
sorting
merge-sort
multiple-selects
1-mark
4
votes
1
answer
29
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 46
We have a procedure $P(n)$ that makes multiple calls to a procedure $Q(m)$, and runs in polynomial time in $n$. Unfortunately, a significant flaw was discovered in $Q(m)$, and it had to be replaced by $R(m)$, which runs in exponential ... $P(n)$ runs in polynomial time in $n$ if, for each call $Q(m),m \underline<\log \;n.$
GO Classes
asked
in
Algorithms
Feb 5
by
GO Classes
381
views
goclasses2024-mockgate-14
algorithms
asymptotic-notation
time-complexity
2-marks
3
votes
0
answers
30
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 47
A $\text{stable sort}$ preserves the order of values that are equal with respect to the comparison function. We have a list of three-dimensional points $[(7, 1, 8),(3, 5, 7),(6, 1, 4),(6, 5, 9),(0, 2, 5),(9, 0, 9)].$ We sort these in ascending order by the ... $[(9, 0, 9),(6, 1, 4),(7, 1, 8),(0, 2, 5),(3, 5, 7),(6, 5, 9)]$
GO Classes
asked
in
Algorithms
Feb 5
by
GO Classes
180
views
goclasses2024-mockgate-14
algorithms
sorting
2-marks
Page:
1
2
3
4
5
6
...
118
next »
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
-tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Recent Posts
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(25)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(683)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
243k
comments
79.7k
users
Recent questions tagged algorithms
Recent Blog Comments
Hlo I'm Rupesh I got AIR 3485 in gate CS and AIR...
@Ajay Sasank here is the direct link...
Thank you for the post didi My GATE 2023 & 2024...
I Hope it helps 😊
Today's best post I seen thank you for motivation