Розмір відео: 1280 X 720853 X 480640 X 360
Показувати елементи керування програвачем
Автоматичне відтворення
Автоповтор
Actually i watched several videos but recently i noticed that always your way of explaining makes me understand things .Not everyone's cup of tea .Keep going bro🔥🔥
🙏🏼
nice explanation with illustrations ! keep up the good work man really appreciated
thanks
Great Explanation.
Thanks
Best Explanation
Grate Explanation💥
welcome
Good explanation
Thanks and welcome
Great explanation sir
Thank you sir :)
it was difficult. had to see video multiple times. i still couldnt undertand why we are doing and operation on isSafe ,checkSafeState ans
to optimise runtime. sane result of a node like in DP
Today you uploaded late . 😢
prediction of question dint work :)
can u detect the errorclass Solution { public: vectorsafe_node;bool dfs(vector& graph,vector&visited,int i){ visited[i]=1; bool is_safe=false; for(int neigh:graph[i]){ if(visited[neigh]==0){ is_safe&=dfs(graph,visited,neigh); } else if(visited[neigh]==1){//cycle return safe_node[i]=false; } else if(visited[neigh]==2){//already computed is_safe&=safe_node[neigh]; } } visited[i]=2; return safe_node[i]=is_safe;} vector eventualSafeNodes(vector& graph) { int n=graph.size(); safe_node=vector(n,true); vectorvisited(n,0); for(int i=0;i
Actually i watched several videos but recently i noticed that always your way of explaining makes me understand things .Not everyone's cup of tea .Keep going bro🔥🔥
🙏🏼
nice explanation with illustrations ! keep up the good work man really appreciated
thanks
Great Explanation.
Thanks
Best Explanation
🙏🏼
Grate Explanation💥
welcome
Good explanation
Thanks and welcome
Great explanation sir
thanks
Thank you sir :)
welcome
it was difficult. had to see video multiple times. i still couldnt undertand why we are doing and operation on isSafe ,checkSafeState ans
to optimise runtime.
sane result of a node like in DP
Today you uploaded late . 😢
prediction of question dint work :)
can u detect the error
class Solution {
public:
vectorsafe_node;
bool dfs(vector& graph,vector&visited,int i){
visited[i]=1;
bool is_safe=false;
for(int neigh:graph[i]){
if(visited[neigh]==0){
is_safe&=dfs(graph,visited,neigh);
}
else if(visited[neigh]==1){//cycle
return safe_node[i]=false;
}
else if(visited[neigh]==2){//already computed
is_safe&=safe_node[neigh];
}
}
visited[i]=2;
return safe_node[i]=is_safe;
}
vector eventualSafeNodes(vector& graph) {
int n=graph.size();
safe_node=vector(n,true);
vectorvisited(n,0);
for(int i=0;i