About 84,700 results
Open links in new tab
  1. Rotate array to the right by k steps : r/leetcode - Reddit

    Jun 23, 2022 · Ahhh this is such a smart approach. I was stuck on this for hours but I knew there was a way to iterate through the array without going the number of k times. Thank you! Also, …

  2. Solution hell : r/leetcode - Reddit

    Oct 1, 2023 · Try and draw problems like Rotate Array out on paper and see how you can manipulate the elements algorithmically to get to where you want. Seriously. I have a giant …

  3. Rotate Array | LeetCode 189 | Both Cyclic and Reverse Array

    Oct 16, 2020 · r/leetcode• Rotate Array | LeetCode 189 r/leetcode• If you haven’t studied segment trees so far, please do yourself and study it and you can solve 20-30 or more leetcode HARD …

  4. Can't understand the solution to : Search in Rotated Sorted Array : …

    Aug 13, 2022 · The purpose of <= is through search every part of the rotated sorted array. If target e.g. is 1 and nums is [1,3,5] you have to loop through each element, also the last one. …

  5. r/leetcode on Reddit: Rotate Array - '''Do not return anything, …

    Rotate Array - '''Do not return anything, modify nums in-place instead.''' Does not seem to work for me or am I missing something trivial?

  6. Detailed walkthrough of LeetCode 48: Rotate Image - Reddit

    Jan 25, 2020 · 73K subscribers in the leetcode community. Discuss interview prep strategies and leetcode questions

  7. How does one think of (size-k%size) condition in rotate array …

    Jun 29, 2022 · Whenever the question is something about a circular array, rotation in array or anything where you can goto the last element from the first one then there's a possibility of …

  8. Search in a rotated sorted array : r/leetcode - Reddit

    May 30, 2022 · Since it’s a rotated sorted array, that means that there will always be a left sorted portion, and a right sorted portion. This if statement is checking to see if your midpoint is in the …

  9. Rotate List | LeetCode 61 : r/leetcode - Reddit

    Oct 8, 2020 · 94K subscribers in the leetcode community. Discuss interview prep strategies and leetcode questions

  10. Searching in a rotated sorted array problem on leetcode is

    Mar 29, 2019 · Searching in a rotated sorted array problem on leetcode is beyond me Every time I try writing code for this problem I’m off somewhere. Is there a thought process or pattern that I …