Розмір відео: 1280 X 720853 X 480640 X 360
Показувати елементи керування програвачем
Автоматичне відтворення
Автоповтор
the second problem gave me a sleep less night but was finally able to solve them both.
great :)
bhai aap har contest ki isi tarah vedio banao bhai
time is the issue 🥲
slightly confused here should we not mark the node as visited when we dequeue and not when we enqueue?
If we reach a node for the first time means Greedily that must be shortest path to reach that node.So, it doesnt matter if we reach theough any longer path coz we care about shortest path finding only :)This is a greedy algorithm.
I think problem statement is not correct ? This is not mention that if current time is less than the next time, we only move with current time + 1.
They mentioned whats not allowed.Everything else is allowed hence had to derive the logic :)It could have been more clearly framed though.
@@techdose4u how can I start thinking in that direction ? Please suggest.
the second problem gave me a sleep less night but was finally able to solve them both.
great :)
bhai aap har contest ki isi tarah vedio banao bhai
time is the issue 🥲
slightly confused here should we not mark the node as visited when we dequeue and not when we enqueue?
If we reach a node for the first time means Greedily that must be shortest path to reach that node.
So, it doesnt matter if we reach theough any longer path coz we care about shortest path finding only :)
This is a greedy algorithm.
I think problem statement is not correct ? This is not mention that if current time is less than the next time, we only move with current time + 1.
They mentioned whats not allowed.
Everything else is allowed hence had to derive the logic :)
It could have been more clearly framed though.
@@techdose4u how can I start thinking in that direction ? Please suggest.