i am new at julia and i have the following question:
How can i insert nodes in a RED_BLACK tree made of strings and another stucture? For example: Code the functions necessary to insert and remove nodes of the type represented in Figure 1 for trees of type RED-BLACK. Demonstrate how it works in the insertion with the following names:
- James James
- Joe Joe
- Livia Livia Displaying the memory contents after the operation.
THE TYPE MENTIONED ("in figure 1"):
"""
structure that represents Full names
"""
mutable struct Nomes
key::Int
nome::String
end
"""
Nomes( nome::String )
Register constructor for names with no accents
"""
function Nomes( nome::String )
key = sum( [ Int( c ) for c in nome ] )
Nomes( key, nome )
end