HackerRank Get Node Value Solution Explained - Java

preview_player
Показать описание


Preparing For Your Coding Interviews? Use These Resources
————————————————————

Other Social Media
----------------------------------------------

Show Support
------------------------------------------------------------------------------

#coding #programming #softwareengineering
Рекомендации по теме
Комментарии
Автор

Change that else to
else if(head != null)
Because if there is only one element then pointer_node will still increment and would become null which would give null pointer exception

arjunsabu
Автор

initialize int c = -1 rather than c = 0. Because its showing run time error.

mridulchaudhary
Автор

your videos have been extremely helpful, keep it up man.

enarcs
Автор

Thanks a lot for the video and explanations. major help for beginners like us!

GRMREAPR
Автор

Thanks dude, it was really helpful :)

pradip
Автор

counter<=positionFromTail

otherwise you will get error

vrashankraom
Автор

NPE should come, need to add boundary condition in this logic as suggested by Mahesh & Arjun

SaurabhGadariya
Автор

while(head->next != NULL) isn't this should be there instead of the above code?

ashishdukare
Автор

I dont understand how the loop breaks out when we reach position 7 and not just continue traversing?

GRMREAPR
Автор

I dont understand the logic here. Can anyone please explain?

elasingh
visit shbcf.ru