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
Test Series
ankit_thawal
asked
in
Programming in C
Jan 10, 2018
406
views
1
vote
1
vote
Choose the correct option, from the following:
I) We can find the cycle in the graph using BFS.
II) We can find the cycle in the graph using DFS.
III)Both Correct
IV)Both wrong
depth-first-search
cycle
ankit_thawal
asked
in
Programming in C
Jan 10, 2018
by
ankit_thawal
406
views
answer
comment
Follow
share this
share
4 Comments
by
Anu007
commented
Jan 10, 2018
reply
Follow
share this
Both can be used to find cycle in graph .
1
1
by
ankit_thawal
commented
Jan 10, 2018
reply
Follow
share this
I also gave the option (III) but answers is(II).
Explanation provided is that BFS is bad choice when graph is directed.
But as in question it's nowhere mentioned about type of grpah so i think option(III) is correct.
Correct me if I am wrong.
0
0
by
joshi_nitish
commented
Jan 10, 2018
reply
Follow
share this
even in directed graph, both BFS and DFS can detect cycle.
0
0
by
Shivam Chauhan
commented
Jan 10, 2018
reply
Follow
share this
Back edges are used to detect cycles. We find back edges in BFS and DFS both. So both are correct.
0
0
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
0
Answers
← Previous
Next →
← Previous in category
Next in category →
Related questions
0
votes
0
votes
1
answer
1
admin
asked
in
Graph Theory
Mar 30, 2020
2,343
views
NIELIT 2017 DEC Scientist B - Section B: 23
Let $G$ be a complete undirected graph on $8$ vertices. If vertices of $G$ are labelled, then the number of distinct cycles of length $5$ in $G$ is equal to: $15$ $30$ $56$ $60$
admin
asked
in
Graph Theory
Mar 30, 2020
by
admin
2.3k
views
nielit2017dec-scientistb
discrete-mathematics
graph-theory
cycle
2
votes
2
votes
0
answers
2
aditi19
asked
in
CO and Architecture
Dec 8, 2018
604
views
DMA Doubt
can someone explain what is preparation time in DMA exactly? and why is it multiplied by CPU cycle time in most of the questions here? does preparation time means that a word is brought into disk controller buffer from hard disk and it utilizes CPU? PS-DMA is giving me headaches!!!
aditi19
asked
in
CO and Architecture
Dec 8, 2018
by
aditi19
604
views
dma
co-and-architecture
cycle
burst-mode
0
votes
0
votes
1
answer
3
Na462
asked
in
CO and Architecture
Oct 12, 2018
1,372
views
Clock per instruction
What is the difference between Effective CPI and Average CPI ? A program is run on 40 MHZ with instruction mix and corresponding clock cycle count. Determine : * Effective CPI * Average CPI Instruction Clock Cycle Instruction Count Arithmetic 1 45000 Floating Point 2 32000 Data Transfer 2 15000 Control Transfer 2 8000
Na462
asked
in
CO and Architecture
Oct 12, 2018
by
Na462
1.4k
views
co-and-architecture
stall
cycle
0
votes
0
votes
0
answers
4
Na462
asked
in
CO and Architecture
Sep 24, 2018
473
views
Memory cycles
Na462
asked
in
CO and Architecture
Sep 24, 2018
by
Na462
473
views
co-and-architecture
cycle
numerical-answers
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)
Programming
(4.1k)
Programming in C
(4.1k)
Programming in Python
(5)
DS
(2.0k)
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
(684)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
244k
comments
80.0k
users
Recent Blog Comments
category ?
Hi @Arjun sir, I have obtained a score of 591 in ...
download here
Can you please tell about IIT-H mtech CSE self...
Please add your admission queries here:...
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy