Post Your Answer
Implementing Kruskal algorithm in C++
5 years ago in Algorithms By Prajwal Sharma
How to implement Kruskal algorithm in C++? Please provide me the codes.
All Answers (4 Answers In All)
By nadeemimi Answered 5 years ago
#include
#include
#include
using namespace std;
#define edge pair
class Graph {
private:
vector
By Prajwal Sharma Answered 5 years ago
Yes mam! I want to implement kruskal algorithm to generate Minimum Cost Spanning Tree. Any suggestions?
By Renu Answered 5 years ago
Use the below codes for the implementation of Kruskal algorithm.
#include
#include
#include
using namespace std;
int cost[10][10],i,j,k,n,m,c,visit,visited[10],l,v,count,count1,vst,p;
main()
{
int dup1,dup2;
cout<> n;
cout <>m;
cout <<"EDGE Cost";
for(k=1;k>i >>j >>c;
cost[i][j]=c;
cost[j][i]=c;
}
for(i=1;i<=n;i++)
for(j=1;j<=n;j++)
if(cost[i][j]==0)
cost[i][j]=31999;
visit=1;
while(visit
asked at 05 Dec, 2020 17:13 in Algorithms By Zeba Malik
asked at 04 Dec, 2020 17:01 in Algorithms By Daniel
asked at 12 Nov, 2020 06:07 in Algorithms By Vishal
asked at 27 Mar, 2019 07:50 in Algorithms By Rohini Singh
asked at 26 Mar, 2019 04:13 in Algorithms By Ravneet Singh
asked at 09 Mar, 2019 07:16 in Algorithms By Kamlesh Meena
asked at 04 Mar, 2019 09:38 in Algorithms By Renu
asked at 03 Feb, 2019 07:13 in Algorithms By Riya N
asked at 01 Feb, 2019 09:17 in Algorithms By Amrit Singh
717122 Bhagirathi Bisht
Query regarding image processing
653564 Sonam Bhatia
749713 Muhammad Umar Farooq
Disagreements between my supervisor and me
773344 Anju Mehera
716442 Muhammad Umar Farooq
Difference between multivariate and bivariate analysis
848414 Lalit Mudra
697371 Rahul Kohli
710337 Raghav V
Peer reviews are reliable or not?
678515 Priyanshu Rathore
- Angular
- Research Objectives
- PhD Admissions
- Action Research
- APA Style
- Annexure I Journals
- Academic Writing
- Abstract
- Architecture
- Architecture
- Assignments
- Bibliography
- Case Study
- Citations
- Concept Matrix
- Concept Paper
- Conceptual Framework
- Conclusion
- Content Analysis
- Corrections
- Cross Sectional Study
- CST Software
- PhD Data
- Data analysis
- Data Collection
- Data Analysis
- Descriptive Statistics
- Design
- Discussion
- Dissertation
- Draft
- Editing
- Empirical Paper
- Engineering
- English literature
- Ethnobotanical
- Ethnographic Method
- Excel
- Executive Summary
- Financial analysis
- Formatting
- Grammarly
- Grounded theory
- Guidelines
- HR
- Hypothesis
- Impact Factor Journals
- Interview
- Introduction
- Java
- Journal
- LabVIEW
- Latex
- Literary Analysis Techniques
- Literature
- Literature Review
- Longitudinal study
- Management
- Material for study
- Matlab
- Methodology
- MLA Format
- MLA Style
- Objectives
- Peer Review
- Paper Publication
- PhD
- PhD Funding
- PhD Interview
- PhD planner
- PhD Thesis
- PhD Management
- Pilot Study
- Plagiarism Check
- Presentation
- Psychology
- Qualitative Data
- Quantitative methods
- Qualitative Method
- Qualitative research
- Qualitative Research
- Quantitative research
- Questionnaire
- References
- Referencing
- Report Writing
- Research design
- Research Methodology
- Research methods
- Research objective
- Research Paper
- Research philosophy
- Research Problem
- Research Proposal
- Research Question
- Research Hypotheses
- Review Paper
- Revisions
- Sample
- SCI Journals
- Secondary Data Analysis
- Secondary Source
- Software
- Software for Plagiarism
- SPSS
- SQL
- SSCI Journals
- STATA
- Statistical Tests
- Structural Analysis
- SWOT Analysis
- Synopsis
- Technical Writing
- Thematic Analysis
- Thomson Reuters
- Topic
- Topic Selection
- Turnitin
- University Guidelines
- Variables
- Writing
- Writing Editing
- Testtag
- Dissertation
- Simulation
- Coding
- Scientific Manuscript
- Algorithms
- Design
- Software
- Statistical Analysis
- Analysis
- Supervising
- Parametric Test
- Parameter
- Submission
- Base Paper
- Interpretation
- Dissipation Systems
- Data Science
- Machine Learning
- Hybrid Electric
- Power Control
- ArcGiS
- Spatial Analysis
- Switching
- Simulink
- Artificial Intelligence
- Deep Learning
- Panel Data
- Reliability
- Pandemic
- COVID-19
- HRM
- Ansys
- Multiphase Flow Modelling
- Remote Sensing Software
- ENVI
- Qualitative Research
- Thinking
- Likert Scale
- Scale Construction
- Sample Size
- Methodology
- Questionnaire
- Regression
- Linear Equation
- Linear Programming
- Wireless Communications
- Digital Communications
- Wireless Network
- Publications
- Publications
- Scientific Research
- Convergent Variant
- Conferences
- Conferences
- Abstracts
- Bioinformatics
- Differential Gene
- Survey
- Somatic Cell Nuclear Transfer
- Research Design
- Writing
- Microsoft Windows
- Student
- Circuits
- Digital
- Serum
- Plasma
- Polymerase Chain Reaction
- Solar Collector
- Heat Transfer
- Radiation
- API
- Python
- Research Paper
- Design Thinking
- Training
- Psychology
- Python
- R Programming
- Primer
- Journal Impact Factor
- Conferences
- Big Data
- Cloud Computing
- Human Behavior
- Structural Equation Modelling
- SEM Analysis
- Applied Mathematics
- Dynamical Systems
- Statistics
- Blockchain
- Testing
- Publications
- Amos
- EViews
- NS2
- NS3
- Data Analysis Tool
- Conceptual Framework
- CST Software
- Dissertation
- Indroduction
- Structural Analysis
- Renewable Energy
- Medicine
- AI Model
- science experiments
- FUTURE TECH