LeetCode Problems | Medium Question | Rotate Array

Sdílet
Vložit
  • čas přidán 7. 09. 2024
  • Learn how to Rotate an Array in this LeetCode medium difficulty problem! After getting heavy demand from you, we are solving this problem in both C++ and Java.
    If you are joining us late, to know more about PWSkills & plans :
    Watch the Orientation Video: • C++ DSA and Java DSA -...
    Watch the Launch Video: • @CollegeWallahbyPW THI...
    00:19 Question Explanation
    02:57 Brute Force Time & Space Complexity
    04:19 Time Optimized Approach Explanation
    08:13 Optimized Approach Time & Space Complexity
    08:54 Best Approach Explanation
    11:42 Best Approach Time & Space Complexity
    12:06 Extra Tip
    13:06 Very Important Concept
    15:59 Java Code
    18:36 C++ Code
    ▶️ PW Skills Website - pwskills.com
    ▶️ PW Skills Instagram - / pwcollegewallah
    ▶️ PW Skills LinkedIn Channel -
    ▶️ PW Skills Telegram Channel- t.me/SkillsPW
    #CollegeWallah #PhysicsWallah #PhysicsWallahDkills #PWSkills #Programming

Komentáře • 35

  • @Afzal3000
    @Afzal3000 Před rokem +8

    Hello Jeevika ma'am, please continue this format in which solve a question in both language

  • @techmercy
    @techmercy Před rokem +12

    Need complete full stack app development course from zero to advance 🌀

  • @ayush1344
    @ayush1344 Před rokem +7

    Need a leetcode series going parallel with c++ series

  • @25-cse-csmohitkumarmandal59

    Mam please isko continue rakhiye...5-6 days gap is not acceptable... please its request mam....

  • @ghayoorhussain8930
    @ghayoorhussain8930 Před rokem +1

    class Solution {
    public:
    void rotate(vector& nums, int k) {

    vector temp(nums.size());

    for(int i = 0; i < nums.size(); i++){

    temp[(i+k)%nums.size()] = nums[i];
    }

    nums = temp;

    }
    };

  • @k.s.8155
    @k.s.8155 Před 3 měsíci

    Mam please upload more videos of leetcode problems, Your expalanation skills are just wow!

  • @InformationJagat
    @InformationJagat Před rokem

    Solution video koe nhi bnata..lekin aap bna rhe ho what a great think...❤️✌🏻

  • @xtzyrox2764
    @xtzyrox2764 Před rokem +3

    Need more videos of leetcode problems

  • @nayanrajawat8000
    @nayanrajawat8000 Před rokem

    waiting for more further videos on leetcode questions,your way of explanation is good.

  • @codysaurabh
    @codysaurabh Před rokem +2

    TIme Limit Exeded For the first Approach mam..
    class Solution {
    public:
    void rotate(vector& nums, int k) {
    int n=nums.size();
    int temp,i;
    k= k%n;
    while(k--)
    {
    temp = nums[n-1];
    for(i=n-1;i>0;i--)
    {
    nums[i]=nums[i-1];
    }
    nums[i]=temp;
    }
    }
    };

  • @Arjun-kc9te
    @Arjun-kc9te Před měsícem

    Where can i get access to this complete playlist??

  • @akashtiwari397
    @akashtiwari397 Před rokem +1

    mam plz bring more session on question pratice

  • @Shauryacious
    @Shauryacious Před rokem

    please continue the series

  • @radhikadube7360
    @radhikadube7360 Před rokem

    ma'am plz upload more video....on daily basis

  • @logicBuildingWithSoumen

    Please upload daily one video 🙏🙏🙏🙏

  • @jatinrajput8368
    @jatinrajput8368 Před 9 měsíci

    waiting for more video

  • @suryakantabehera4901
    @suryakantabehera4901 Před rokem

    Mam plz continue

  • @muhammedali4004
    @muhammedali4004 Před rokem

    Last wala solution i.e array ko reverse kr k rotate krne wale ki runtime complexity o(n^2) nhi hogi. Hum pehle pura array reverse kr rhy ha jiski time complexity O(n) ha phir hum dobara array ko parts me reverse kr rhy ho.

  • @computerscience68
    @computerscience68 Před rokem

    I request to pw skills Team please upload video on leetcode problem...plz plz plz

  • @pramodwadile6076
    @pramodwadile6076 Před rokem

    Waiting for next video.

  • @deepanshusingh5315
    @deepanshusingh5315 Před rokem

    From where we can practice more problems

  • @aayushkamble288
    @aayushkamble288 Před rokem

    3 time reverse ki to bhi kar sakte ka?

  • @AkashSingh-pw3yb
    @AkashSingh-pw3yb Před rokem

    Start a flutter development course please🙏🙏

  • @AnshBorse-if1ll
    @AnshBorse-if1ll Před rokem

    Thanks maam😀😀😀

  • @user-mn6md9bq3y
    @user-mn6md9bq3y Před 4 měsíci

    .......
    3. 3
    5. 7 5. 7
    11. 13. 17 . 11. 13. 17
    Print two horizontal equilateral triangle made of prime number for n rows,, prime number starts with 3,,,and No arrays ,,no string,,no string function,,,or no list function,,,or other functions should be used

  • @agnivaranastudy6493
    @agnivaranastudy6493 Před rokem +1

    Maam can you plz give solution in Python

    • @mayanksharma5540
      @mayanksharma5540 Před rokem

      split the list and used
      [ : : -1] for reverse and add and return

  • @RahulSingh-kn1dc
    @RahulSingh-kn1dc Před rokem

    Maam please solve 2 questions daily

  • @coadinghub2812
    @coadinghub2812 Před rokem

    need full stack web development

  • @viveknamdev2605
    @viveknamdev2605 Před 8 měsíci

    like this viedo

  • @ujjwalgupta5946
    @ujjwalgupta5946 Před rokem

    Need JavaScript and react course

  • @smileysmith7219
    @smileysmith7219 Před rokem

    PLS SIR NIMCET PREPERATION COURSE ON COLLEGE WALLAH PLSSS SIRR

  • @RajYadav-yh7vv
    @RajYadav-yh7vv Před 9 měsíci

    why hello bacho? 🤣 people who are solving leet code problems might not be juveniles/kids. Some people are elder than you😅

  • @akashdubey1550
    @akashdubey1550 Před rokem

    khud se code nhi hota hai