in this we have to iterate the whole linked list every time for checking if the element which is new input is repeated or not is it the correct approach or we have to do anything else
Please reply for this query
once check this code -->
but hashing is not taught till now according to course sequence
ok then submit it here https://hack.codingblocks.com/app/contests/1674/1307/problem,
u only have to write algorithm for cycle detection and removal.
rest everything is already handled
i have a doubt that are we creating a circular list in this question
and if yes than how we know when to connect the list
I think i have to do diff thing in this question because the question you are explaining is already present in challenges which i already solved this is different question
both are same bro.
in both the question u have to detect cycle and then break it.
and they both have same solution
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.