A
A
albertalexandrov2020-05-05 21:46:38
Data Structures
albertalexandrov, 2020-05-05 21:46:38

Data types for binary tree?

Hello!
Do I understand correctly that for binary trees the data must:
1. be of a homogeneous nature and
2. implement comparison methods (for sorting)?
It is impossible to put a string, a number and a dictionary into a binary tree?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GavriKos, 2020-05-05
@albertalexandrov

In fact, only the second point is important.
Because int and float can be compared.
Yes, and a line with a dictionary too - but context-dependent.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question