It you don't understand in first watch, don't skip it. See it again, you will understand. In my case i was not able to understand in my first watch , when i repeat , i got the whole thing clear
Hello Kunal. I want to know, After the DSA course, will you show us how to use our skills in open source and all that stuffs till how to approach in a company? If not then please consider this.🙏🙏🙏
First thing to understand is how range works in substring. The code Substring (start index, end index) takes all the values from start index upto the end index-1. So for String "hello", Substring(0,2) gives "he" (i.e start index is included and end index is excluded). Just remember ( end index minus 1 )
hey Kunal can you please tell us more about how you got that 41 lac package. I am a freshman and I want to get this sort of remote job, what should I do?
confusing, can improve more on teaching part, but great content. Actually I need to put lot of attention and go back understand, sort out some things myself, you speed goes insanely fast at some points. While explaining the algorithm if its something new, you can take out some time to explain the substring concept like exclusive and inclusive and how its working in the loop. i know it may get frustrating but the course teaching would be much more clean. And we will enjoy, it more. Btw thanks alot for explaining all these concepts, my thought process is building good day by day. And hope one day i will be able to crack those faagm technical interviews easily. Thanks alot.❤
PERMUTATIONS SOLUTION FOR INTEGER ARRAY(instead of String): --------------------------------------------------------------------------------------------------------------------- class Solution { public List permute(int[] nums) { List proc = new ArrayList(); List unproc = new ArrayList(); for(int e:nums){ unproc.add(e); } return intPerm(proc, unproc); } public static List intPerm(List proc, List unproc){ if(unproc.isEmpty()){ List res= new ArrayList(); res.add(proc); return res; } List ans= new ArrayList(); Integer elt=unproc.get(0); for(int i=0;i
Kunal mujhe internship ke liye apply krna hai pr yeh smhj nhi aarha ki skills mai kya likhu maine yeh course shuru se abhi tk full follow kiya is course ke basis pr kuch skill likh saku mai 🥺 plz reply
Any one who want C++ soltuion 👇👇👇 void stringPermutation(string &s, string t, int i,vector &vs) { if(i==s.size()) { vs.push_back(t); return; } for(int j=0; j
The best recursion video ever! I have been watching all your recursion videos and I can now solve recursion challenges. Looking forward to more of these. Thank you for demystifying the monster!
You explain a lot about how you have taught a particular concept earlier and that you wont explain it again. okay I get it just prob refer the video in which you have taught that concept for ppl who prob havent watched all your videos. Dont everytime say that you have explained it earlier and it entire story it becomes annoying.(Just a suggestion) PS: your teaching is amazing it is helping me a lot, thanks!
People in comments are all geniuses. (excluding me) Most of them understood this at once. I personally had to rewatch is many times and draw the recursion tree on notebook few times to understand it. Great video Kunal. Recursion is like that unless u do on paper few timess u dont understand.
To Everyone who's learning in Cpp or knows, The code that I've written for permutations is running infinite times. Can anyone assist me. #include using namespace std; void permutation(string p, string up) { if (up.empty()) { cout
@@twi4458 the problem is here "p = first + ch + last; " you are assigning the value to p again and the length of p increases with each function call and loop never breaks. Means after cba it will go like ccba, cccba, so on so directly pass the expression or assign it to different var such as "String ans = first + ch + last;" and it will work
To Everyone who's learning in Cpp or knows, The code that I've written for permutations is running infinite times. Can anyone assist me. #include using namespace std; void permutation(string p, string up) { if (up.empty()) { cout
Permutation code: import java.util.*; public class Main { public static void main(String[] args) { String s="abcd"; ArrayList ans=permute(s,""); for(int i=0;i
Your content is amazing, I went through lots of DSA courses on youtube, but no video develops the understanding and solution approaching mindset as you do. Blessed that I found you.🔥🔥🔥
Hi Kunal, Your recursion playlist on RUclips has been a game-changer for me! I have learned so much and have been able to apply the concepts in my coding projects. I would love to see a new lecture series on dynamic programming. I know it's a challenging topic, but I trust your teaching style and explanations to make it more approachable. Keep up the great work!
Hi Kunal can you please explain unique permutations with duplicates element I tried many times but I enable to map unique permutation logic with explained by your logic or can you just give me any hint.
hey kk can we use for loop inside a recursion function or not or why we are using loop in permutation question otherwise it will not a recursion based question
hello bahiya you will write a code of premutation this is : static void permutation(String p,String up) { if(up.isEmpty()) { System.out.print(p); return; } char ch=up.charAt(0); for(int i=0;i
At 20:12 , For counting the number of permutations, instead of processing and modifying the whole string we can just take the length of the string and perform factorial using recursion approach or whatever right!?
The permutations for string you explained is so great. But it seems like this approach doesn't go well for permutations of array. No video on permutations of array is getting into my head. Can you make one or send me a code
Kunal, here is O(n) solution for permutation count - int pc( str ) { if ( str is empty ) return 0; if( str.length() == 1) return 1; int original_len = str.length(); int rem_len = pc( str.substring(1) ); return ( original_len * rem_len ); } I am building my thought process ... thanks!!! ❤️❤️✔️
using comment to save code snippet. public class Main { public static void main(String[] args) { String str = "abc"; System.out.println(str.substring(0,0)); permutations("", str); } static void permutations(String p, String up) { if (up.isEmpty()) { System.out.println(p); return; } char ch = up.charAt(0); // No of function calls -> processed length + 1 for (int i = 0; i
Thank you isn't enough for this amazing content!!!!!! no words 🤐 I can't find Trees/Graphs/DP videos in this playlist or any other on your channel, are you planning to upload it any time soon? these are helping me a lot I wish I could go back in time and started with your playlist last year itself!!!!!
DSA + interview preparation playlist: ruclips.net/p/PL9gnSGHSqcnr_DxHsP7AW9ftq0AtAyYqJ
It you don't understand in first watch, don't skip it. See it again, you will understand. In my case i was not able to understand in my first watch , when i repeat , i got the whole thing clear
yaa i also do the same
9:30 If anyone have the confusion with brackets, kunal mistakenly used Inclusive in place of exclusive bracket and vice versa.
Thanks man
thanks
Yeah same thought
yes
Hello Kunal. I want to know, After the DSA course, will you show us how to use our skills in open source and all that stuffs till how to approach in a company? If not then please consider this.🙏🙏🙏
i am not able to get this 0,0 + ch concept (9:00 - 10:00), can anyone explain please, i have watched thirce but sill did not get
First thing to understand is how range works in substring. The code
Substring (start index, end index)
takes all the values from start index upto the end index-1. So for String "hello",
Substring(0,2)
gives "he" (i.e start index is included and end index is excluded).
Just remember ( end index minus 1 )
hey Kunal can you please tell us more about how you got that 41 lac package. I am a freshman and I want to get this sort of remote job, what should I do?
Thumbnail clears that the topic which we are going to see in recursion (recurring photos) LOL
Great work Kunal you're helping us in many ways. 😊
simpler better code for permutation: static void permutations(String p,String up){
if(up.isEmpty()){
System.out.println(p);
return;
}
int n = up.length();
for(int i =0;i
Great
Can u please tell till when this course will be finished ??
bhai top class :), gazab padhaye ho, recusrsion khud se sochna aagya, Thanks alot
and why you are not monetizing your content, you are putting so much efforts teaching here on RUclips.
it wouldn't hurt to leave a like. It is the least we can do for Kunal.
You are a genius kunal !! 🙌
confusing, can improve more on teaching part, but great content. Actually I need to put lot of attention and go back understand, sort out some things myself, you speed goes insanely fast at some points. While explaining the algorithm if its something new, you can take out some time to explain the substring concept like exclusive and inclusive and how its working in the loop. i know it may get frustrating but the course teaching would be much more clean. And we will enjoy, it more. Btw thanks alot for explaining all these concepts, my thought process is building good day by day. And hope one day i will be able to crack those faagm technical interviews easily. Thanks alot.❤
Already done in Strings video
@@KunalKushwaha hmm thank you.👍🏻♥️
PERMUTATIONS SOLUTION FOR INTEGER ARRAY(instead of String):
---------------------------------------------------------------------------------------------------------------------
class Solution {
public List permute(int[] nums) {
List proc = new ArrayList();
List unproc = new ArrayList();
for(int e:nums){
unproc.add(e);
}
return intPerm(proc, unproc);
}
public static List intPerm(List proc, List unproc){
if(unproc.isEmpty()){
List res= new ArrayList();
res.add(proc);
return res;
}
List ans= new ArrayList();
Integer elt=unproc.get(0);
for(int i=0;i
Kunal mujhe internship ke liye apply krna hai pr yeh smhj nhi aarha ki skills mai kya likhu maine yeh course shuru se abhi tk full follow kiya is course ke basis pr kuch skill likh saku mai 🥺 plz reply
Same
Hii Naman
How's this course
M new in programming
Should I follow? Also m a medicore student
Any one who want C++ soltuion 👇👇👇
void stringPermutation(string &s, string t, int i,vector &vs)
{
if(i==s.size())
{
vs.push_back(t);
return;
}
for(int j=0; j
11:45 kunal : for ( int i = o ; i < 3 ; i++) {
System.out.println("In death");
}
👍👍👍👍
😂😂😂😂
In death
In death
In death
😂😂😂
9:15 have u reversed the incl. excl. signs?
Logic becomes more clear after watching it again
Bro the videos aare very nice but plz try to increase the frequency... Plz
Working on it
Best DSA course on this planet
WOW that's insane mate how many DSA courses have you taken till now?
it is no way wrong if i say your lectures are really mesmerizing....just amazing Kunal #NailediT🔥
Been following the videos daily and keeping up with them. This is very fun ngl. Great work.
The best recursion video ever! I have been watching all your recursion videos and I can now solve recursion challenges. Looking forward to more of these. Thank you for demystifying the monster!
You must be maths teacher showing pattern🤯👌
You explain a lot about how you have taught a particular concept earlier and that you wont explain it again. okay I get it just prob refer the video in which you have taught that concept for ppl who prob havent watched all your videos. Dont everytime say that you have explained it earlier and it entire story it becomes annoying.(Just a suggestion)
PS: your teaching is amazing it is helping me a lot, thanks!
People in comments are all geniuses. (excluding me)
Most of them understood this at once.
I personally had to rewatch is many times and draw the recursion tree on notebook few times to understand it.
Great video Kunal.
Recursion is like that unless u do on paper few timess u dont understand.
No one understands recursion at once, what you did is the correct way.
You are on fire 🔥🔥🔥 bro
The frequency of vedios 🔥🔥🔥
Thank You 🙏
@@KunalKushwaha Thank you for teaching these stuffs
@@KunalKushwaha Please
continue the frequency till oop ..highly needed
To Everyone who's learning in Cpp or knows, The code that I've written for permutations is running infinite times. Can anyone assist me.
#include
using namespace std;
void permutation(string p, string up)
{
if (up.empty())
{
cout
@@twi4458 the problem is here "p = first + ch + last;
" you are assigning the value to p again and the length of p increases with each function call and loop never breaks. Means after cba it will go like ccba, cccba, so on
so directly pass the expression or assign it to different var such as "String ans = first + ch + last;" and it will work
At 15:32.... I'm like LOL
dude went brrrerwrewarrew...
please explain frequency array and frequency string.... I mean please make a video on these
I will
@@KunalKushwaha thanku so much
Congratulations for AF1 and AJ5. They look dope and u deserve it bro 👌🏻😊
What are they???🙄
To Everyone who's learning in Cpp or knows, The code that I've written for permutations is running infinite times. Can anyone assist me.
#include
using namespace std;
void permutation(string p, string up)
{
if (up.empty())
{
cout
@@twi4458 May be up.at(0) doesn;t remove the first elemrnt in unproccesed. Try adding up.substr(1) after that line
@@chaitanyaprasad6924 No, real issue is I had intialised p again, rather just pass it as argument will give desired result
@@kalwardin3510 shoes :p
Permutation code:
import java.util.*;
public class Main
{
public static void main(String[] args) {
String s="abcd";
ArrayList ans=permute(s,"");
for(int i=0;i
I can understand your logic what you are telling but unable to solve questions by own .PLEASE start making series of leetcode questions .
You are using substring fxn...an extra overhead...explain with swaping metthod
Your content is amazing, I went through lots of DSA courses on youtube, but no video develops the understanding and solution approaching mindset as you do. Blessed that I found you.🔥🔥🔥
thanks kunal before watching your i have a lots of doubts related to permutation ... after watching video ... all doubt are cleared.
Thank you so much!!!
You're welcome!
Hi Kunal,
Your recursion playlist on RUclips has been a game-changer for me! I have learned so much and have been able to apply the concepts in my coding projects. I would love to see a new lecture series on dynamic programming. I know it's a challenging topic, but I trust your teaching style and explanations to make it more approachable. Keep up the great work!
You're helping me with backtracking so much. THANK YOU!!!
Hi Kunal can you please explain unique permutations with duplicates element I tried many times but I enable to map unique permutation logic with explained by your logic or can you just give me any hint.
OOP VIDEO 🙂
9:27 seems little confusing regarding inclusive and exclusive..
Watch array and string video
11:43 => How Induction motor starts ( 3idiots) 😂😂
@Kunal Kushwaha can you tell us who is your guru. how did you teach your self DS Algo so well!
self study
@@KunalKushwaha Wow!
Please cover Kth permutation question
Mostly asked
Bro plz all java + dsa handwritten notes upload in github or drive
kunalllllllllllllllllllllllll plss make more videos your way of teaching is just fab...
hello kunal sir, when u going to start the oops video
Hello
Please cover collections programs in this DSA course please I want to learn different programs on that topics
You are Amazing Bro🔥🔥🔥
--Ignore --
Iterative way will be covered later .
I did permutations just by seeing the previous video. Power of Kunal and recursive tree🔥🔥🔥🔥
hey kk can we use for loop inside a recursion function or not or why we are using loop in permutation question otherwise it will not a recursion based question
i already explained this. we use it when we dont have fixed amount of calls.
Do you have JacaScript course?
hello bahiya you will write a code of premutation this is :
static void permutation(String p,String up) {
if(up.isEmpty()) {
System.out.print(p);
return;
}
char ch=up.charAt(0);
for(int i=0;i
It seems that permutation of strings are trivial in comparison to a list of Integers. How can we go about doing permutation of a list of integers?
# Permutations
```python
class Solution:
def permute(self, nums: List[int]) -> List[List[int]]:
available_items = nums.copy()
self.final_ans = []
current_path = []
self.N = len(nums)
self.backtracking(available_items,current_path)
return self.final_ans
def backtracking(self,available_items,current_path):
if len(current_path) == self.N:
self.final_ans.append(current_path)
for i in range(len(available_items)):
# current_path.append(available_items.pop(i))
# self.backtracking(available_items,current_path)
# available_items.insert(i,current_path.pop())
self.backtracking(available_items[:i]+available_items[i+1:],current_path+[available_items[i]])
```
repeat the lecture you will understand
There is no graphs in this course?
At 20:12 , For counting the number of permutations, instead of processing and modifying the whole string we can just take the length of the string and perform factorial using recursion approach or whatever right!?
Thanks a lot brother,your videos are helping so many people .it would be great if you could explain more examples based on permutations
Amazing kunal Thanks for everything😊😊
Does the time complexity of permutations is n* n^n(no.of levels * time taken at each level)?
Amazingly and feels Effortless!!!
I am not getting Impatient just curious to know when OOPs will start
After recursion related videos end
The permutations for string you explained is so great. But it seems like this approach doesn't go well for permutations of array. No video on permutations of array is getting into my head. Can you make one or send me a code
Which code editor do you use
Can someone explain/or give the code for passing count inside the argument ??
Kunal, here is O(n) solution for permutation count -
int pc( str )
{
if ( str is empty ) return 0;
if( str.length() == 1) return 1;
int original_len = str.length();
int rem_len = pc( str.substring(1) );
return ( original_len * rem_len );
}
I am building my thought process ... thanks!!! ❤️❤️✔️
Great explanation
Amazing explanation..🙂
Does anyone how can we modify the code for duplicates?
using comment to save code snippet.
public class Main {
public static void main(String[] args) {
String str = "abc";
System.out.println(str.substring(0,0));
permutations("", str);
}
static void permutations(String p, String up) {
if (up.isEmpty()) {
System.out.println(p);
return;
}
char ch = up.charAt(0);
// No of function calls -> processed length + 1
for (int i = 0; i
17:41 anyone explain
Thank you isn't enough for this amazing content!!!!!! no words 🤐 I can't find Trees/Graphs/DP videos in this playlist or any other on your channel, are you planning to upload it any time soon? these are helping me a lot I wish I could go back in time and started with your playlist last year itself!!!!!
@KunalKushwaha please complete your course
Dedication levels🔝peaks
👍👍
What will be the complexity of this?
very bakwas explanation
I recommend watching it again.
Day 13
after completing this coarse am is any need do any other things
I am jus literally clapping man😍😍😍😍
Graphs n DP course please ?!?!?!?!!?!?!!?
Many Thanks for another great video and saving our lives 🙏
complete your dsa bootcamp please
can u please do this for a non-repeating string🙏?
respect to you bhaiya
for every every just print it
Thanks.😀 please do not delete these videos later.
why would I
still watching consistently
😀😀😀
19:18
🥰
Trees ki videos kab aaengi ?
Thanks brother! God bless you!
Video 33 Completed!
bhaiya thoda jldi jldi lectures daalo na plzz
please upload dp videos soon
You are a magician Bro...❤❤❤
hey kunal, please start OOPs next
I will