Prufer.size() : size() is a sympy Python library function that returns the size of the Prufer sequence.
Syntax :
sympy.combinatorics.Prufer.prufer.size()
Return :
size of the Prufer sequence
Code #1 : size() Example
from sympy.combinatorics import Permutation, Cycle
from sympy.combinatorics.prufer import Prufer
a = Prufer([ 1 , 2 , 3 ], [ 2 , 4 , 5 ])
print ( "Prufer a size : " , a.size)
|
Output :
Prufer a size : 125
Code #2 : size() Example
from sympy.combinatorics import Permutation, Cycle
from sympy.combinatorics.prufer import Prufer
b = Prufer([ 1 , 2 , 3 , 2 , 4 , 5 ], [ 6 , 7 ], [ 8 ])
print ( "Prufer b size : " , b.size)
|
Output :
Prufer b size : 262144
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape,
GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out -
check it out now!