MY CODE IS GIVING NULL POINTER EXCEPTION PLS TELL ME MISTAKE I AM ALSO ATTACHING LINK TO THE CODE
please share the saved code
You are getting null pointer exception because you are trying to access data of curr which might be null in this case, hence error. So, Instead check if the queue is empty or not.see this: