saurav ghimiresauravghimire.hashnode.dev·Jun 26, 2023Finding an element in Rotated ArrayIf you have ever used an algorithm like Binary Search, you may have come across its advantages over the Time complexity of, let's say a linear search. We will not dive into the realms of time complexities for now. Let us suppose, we have an Array of ...DiscussBinary Search Algorithm
Nilesh Saininileshsaini.hashnode.dev·May 19, 2023Rotate ArrayThis problem asks us to rotate an array of integers by a given number of steps. While seemingly straightforward, finding the most optimized solution can be a captivating puzzle for most of us. In this article, we will delve into several distinct appr...Discuss·49 readsarray
Haneunhanlee.hashnode.dev·Jan 6, 2023[Solution]189. Rotate ArrayProblem Problem_Link Solutions (time, space) O(n), O(n) class Solution { public void rotate(int[] nums, int k) { int len = nums.length; int[] rtnNums = new int[len]; // Rotate elements for (int i = 0; i < len; i++...Discuss·57 readsAlgorithm Solving Study189. Rotate Array