Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

sashafromlibertalia/prufer-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prufer code

This is a C++ implementation of a Prufer code algorithm. Supports both coding and decoding.
Input style: Number of vertices and edges of the graph

Input examples

Input Output
9
2 8
8 5
1 5
1 9
5 4
5 3
3 7
3 6
Prufer code:
8 5 3 3 5 5 1

Edges:
8 2
5 4
3 6
3 7
5 3
5 8
1 5
1 9
Input Output
6
1 4
1 2
4 5
5 6
5 3
Prufer code:
1 4 5 5

Edges:
1 2
4 1
5 3
5 4
5 6

About

🌳 Prufer code implementation

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published