Codeforces and Polygon may be unavailable from March 27, 11:00 (UTC) to March 27, 14:00 (UTC) due to technical maintenance. ×

How to store rooted trees efficiently?

Revision en1, by Noobish_Monk, 2023-08-06 16:33:49

Hello. I've heard there is a way to store trees using like 3 integer arrays. How exactly is it done? And can it be extended on any graph?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Noobish_Monk 2023-08-06 16:33:49 175 Initial revision (published)