The first interview with HR is described elsewhere on Glassdoor.
The second interview took 3-4 hours in my case. The first part is about your CV when you guide them through your experience and education. Questions like 'When did you start programming', 'why do you use neural network here not classical ML', or 'Do you use OOP in your work' are usually asked at that stage. This is to test your presentation skills and to see if you communicate effectively complex topics. In this stage, you can ask about what your interviewers do at their work.
The second part is the theoretical questions about programming languages, comparing C++ and Python, and follow-up questions (e.g. garbage collection in Python, interpreted vs compiled languages), some questions about C++ (like do we need always to take care of memory or not?) but I do not mention C++ in my CV, OOP principles (mainly via examples), some discussion about functional programming. To some questions I simply said that I don't know. The second part ends with the programming question -- in my case, it was to write a function which returns the day of the week for any date in the past given today's date and day of the week. Here I struggled a bit due to the leap years and other edge cases (e.g. date before or after February in a leap year), but eventually, we solved it. Their hints were sometimes useful sometimes not, since I fixed a couple of critical bugs myself during debugging.
The last part was a pirate game brainteaser which I already heard of (roughly know the solution), I informed interviewers about that but we proceded anyway. I solved the main problem (5 pirates) quite quickly but then was asked to generalise to other cases (e.g. 6,7,... 203 pirates) and so on, trying to find the pattern. Here I could not grasp the logic immediately but they proceeded to ask questions about more and more pirates (in case then you run out of money) and which ones are guaranteed to live. Honestly, the hints were not usually useful (I guess they did not understand which part I did not grasp before moving to more complex cases). At some point, they even seemed a little annoyed that I could not follow their hints and immediately predict results for pirate #n+1.
The rejection was based on that the coding problem and brain teaser solutions were provided more slowly than they expected, Also that the programming theory answers were not quite complete.
Overall I had a very good impression of people and company, but hints are not ideal. To give a hint you need to figure out what a person does not understand first.