I'm trying to write my first pseudocode algorithm with MikTEX and algorithm2e package but there are at least two things that I cannot understand. The image below shows what I want to achieve in term of final result.
First of all, I can't understand how to put the function name as the first line. I've tried with \caption and in other ways but I couldn't get rid of the text "Algorithm 1".
The second thing that I want to learn is: how can I declare a variable with its type? i.e RBNode y?
EDIT
Trying to make the question more clear:
- How can I obtain an header (the first line of the image below) like this in the image below? I want that the text between the two black line contains only the function name and the list of parameters


