Hello mam, I don't know how to thank you because you are amazing, The way you teach , the way you solve the problems, applying the approach is much easier even for hard problems, Thank you so much mam for this amazing content........
@TechnosageLearning Жыл бұрын
Thanks for the feedback.. Stay tuned for more videos :)
@dibyendusaha12953 ай бұрын
Time complexity: O(n) Space complexity: O(1) public class Solution { public void Rotate(int[] nums, int k) { int n=nums.Length; k=k%n; swap(nums,0,n-k-1); swap(nums,n-k,n-1); swap(nums,0,n-1); } private void swap(int[] nums, int left,int right) { while(left
@swastikkumar577310 ай бұрын
Mam please continue your leetcode problem series . it will helpful for us
Thank you for detailed information. It was really helpful !!!
@MohibulIslam-m7z10 ай бұрын
Ma'am, you are the best teacher in KZbin, please solve the top 150 DSA problem in Java ASAP , And it will help us to crack Interview. Thank you ma'am
@dp8jl9 күн бұрын
Great explanation, very intuitive!
@DesiInfo61910 ай бұрын
You teach so well!!
@Heavy-coder11Ай бұрын
mene bhoot vedio dekh liye lekin nhi hua mujse i think i quit nd i got your vedio and now i easily solve thnxxx a lot mam ❤❤❤❤❤❤
@TechnosageLearningАй бұрын
Thankyou for the kind words. Will work on more videos to help everyone better
@kaka_goatАй бұрын
Really Really thank you so much mam , really appreciated your work
@adityarajsah4144 ай бұрын
Please do continue with the series, In entire you tube this is the only channel where I am able to understand the solution and co-relate with my approach. I understand because of medical condition you took a break, but please try uploading the videos as soon as possible please Amrita it's my humble request. And if you are not well, Get well soon and then upload the videos.
@TechnosageLearning4 ай бұрын
Thank you for your message. We will be starting up with the videos soon.
@zenitsu55042 ай бұрын
crystal clear explanation 🙇
@raneshmitra81563 ай бұрын
Please continue your Leet code problem series . it will helpful for us
@AnbuAnbu-xj8bx3 ай бұрын
Excellent explanation mam, please post the problem solving videos mam ❤
@aasimahsan61679 ай бұрын
please continue the series of the this playlist it helps us alot
@TechnosageLearning9 ай бұрын
Hi Due to some medical issues..I am on break..Will continue soon
@sanchay_khatwani3 ай бұрын
intresting explanation
@tricksforsolving28046 ай бұрын
Clear explanation, helpful for me
@paniknoob64396 ай бұрын
what does the k%nums.length; do?
@tricksforsolving28046 ай бұрын
@@paniknoob6439it fix the issue of array index out of exception,if your K is more the array length,then we don't write the value of K directly, just divisible with array length & assign to K
@Lubi8792 ай бұрын
Good lecture
@lesa7p2lmansion9 ай бұрын
why did you stop? can you put your linkedin
@PallabChatterjee187 ай бұрын
Please continue the 150 questions series please maam
@LinhTran-om6qh4 ай бұрын
idk but this is simpler: public static void rotate(int[] nums, int k) { int n = nums.length; k = k % n; int[] lastElements = Arrays.copyOfRange(nums, n - k, n); int[] firstElements = Arrays.copyOfRange(nums, 0, n - k); System.arraycopy(lastElements, 0, nums, 0, lastElements.length); System.arraycopy(firstElements, 0, nums, lastElements.length, firstElements.length); }
@malishagavali92253 ай бұрын
the space complexity is linear not constant thats the drawback
@gaurshivam Жыл бұрын
Please continue this series
@TechnosageLearning Жыл бұрын
Will start uploading soon..
@sachintiwari44974 ай бұрын
thank you
@nirajvarma-z7d2 ай бұрын
Can any one say what to change in the code if i want it rotate by left
@aniket5018 Жыл бұрын
i know we are taking k=k%n for out of bound exceptions but why . i mean how k=k%n can help in this situation??
@piyumifernando277811 ай бұрын
Because if k = 100 (or evertime the value of k > n) after applying k = k % n the answer is k = 100 % 3 = 1. Every time it gets an answer for k which is less than n.
@piyumifernando277811 ай бұрын
So out of bound exceptions didn't appear when k > n.
@Mohd.FaisalKhan-oo9qj6 ай бұрын
please continue your leetcode problems series
@TechnosageLearning5 ай бұрын
We will be continuing the series soon. We are working on it
@AmitBiswas01427 ай бұрын
Another 0 ms runtime solution great!!
@paniknoob64396 ай бұрын
buddy , what does the k%nums.length; do?
@webtestingui7187 Жыл бұрын
Hello,could you please post those questions only
@TechnosageLearning Жыл бұрын
Hi...Yes,I will continue this series...stay tuned
@shahbazalam1629 ай бұрын
ma'am please continue the interview series
@jbr.19 ай бұрын
Please come back
@TechnosageLearning9 ай бұрын
Very soon
@CodingJoySoul Жыл бұрын
Why have you guys stopped posting solutions?
@TechnosageLearning Жыл бұрын
Hi.. Due to some medical issues, We couldn't post solutions for a while..Will continue posting solutions very soon..
@DSASolutions2 ай бұрын
good
@brp35226 ай бұрын
What happened to you amrita didi we really miss your concepts
@B_Patidar882 ай бұрын
This code not accepted by leetcode 😢
@muhammadsijal8153 ай бұрын
you'll be back soon right ?
@TechnosageLearning3 ай бұрын
Yes will be back soon, the break was due to medical emergency, now will start soon.
@muhammadsijal8152 ай бұрын
@@TechnosageLearning when can we expect you to upload ?
@musamehdiyevv6 ай бұрын
public void rotate(int[] nums, int k) { int temp = 0; while (k > 0) { temp = nums[nums.length - 1]; for (int i = nums.length - 1; i > 0; i--) { nums[i] = nums[i-1]; } nums[0] = temp; k--; } }
@Vanshkumar-co5pm29 күн бұрын
thanks for the easier solution!!
@anuragpanwar912 Жыл бұрын
This my updated code hopw uoy like class Solution { public void rotate(int[] arr, int k) { if(arr.length 0) { int last = arr[arr.length - 1]; for (int i = arr.length - 1; i > 0; i--) { arr[i] = arr[i - 1]; } arr[0] = last; k--; } } static void reverseArray(int arr[], int start, int end) { while (start < end) { int temp = arr[start]; arr[start] = arr[end]; arr[end] = temp; start++; end--; } } }
@SandraSaade10 ай бұрын
import java.util.Scanner; public class Main { public static void shiftArray(int[] a, int k) { for(int j=1;j
@nizamuddinkhan74086 ай бұрын
time complexity is o(n2) which is incorrect as per leetcode
@paniknoob64396 ай бұрын
what does the k%nums.length; do?
@DavisTibbz2 ай бұрын
Prevent overflow, just in case k is very large. This will return a value less than nums.length