According to this what I can understand is that here we are storing the parent node value in a variable not in ArrayList
According to this what I can understand is that here we are storing the parent node value in a variable not in ArrayList