Размер видео: 1280 X 720853 X 480640 X 360
Показать панель управления
Автовоспроизведение
Автоповтор
Sir why we are returning value only when k= 0 And what is the significance of k-= 1
we were asked to return k element from the spiral matrix list ,and k-=1 is equivalent of k=k-1
Please provide code in C++ also
int findK(vector &a, int n, int m, int k) { if(a.size()==0) return{}; int t=0,l=0,r=m-1,b=n-1; int i=0; while(t
Bro, please use C++ to solve them.
Hello krishna ,Algorithm is the most important aspect for solving any problem , even in the interviews . Language is just the expression of the algorithm . You can implement it in any language once you understand the algorithm behind it .
@@SaiprakashReddy Yeah, I just advised because most people use C++ and they're pretty comfortable in it.
I understood the intent krishna 🙂 , will provide the cpp code wherever necessary .
It's working bro
Sir why we are returning value only when k= 0
And what is the significance of k-= 1
we were asked to return k element from the spiral matrix list ,
and k-=1 is equivalent of k=k-1
Please provide code in C++ also
int findK(vector &a, int n, int m, int k)
{
if(a.size()==0)
return{};
int t=0,l=0,r=m-1,b=n-1;
int i=0;
while(t
Bro, please use C++ to solve them.
Hello krishna ,
Algorithm is the most important aspect for solving any problem , even in the interviews . Language is just the expression of the algorithm . You can implement it in any language once you understand the algorithm behind it .
@@SaiprakashReddy Yeah, I just advised because most people use C++ and they're pretty comfortable in it.
I understood the intent krishna 🙂 , will provide the cpp code wherever necessary .
It's working bro