LeetCode 33 | Search in Rotated Sorted Array | Algorithm Explained (Java)

Publicado el: 16 marzo 2020
en el canal de: Xavier Elon
361
11

The description reads:
"Given an integer array nums sorted in ascending order, and an integer target.

Suppose that nums is rotated at some pivot unknown to you beforehand (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]).

You should search for target in nums and if you found return its index, otherwise return -1.



Example 1:

Input: nums = [4,5,6,7,0,1,2], target = 0
Output: 4
Example 2:

Input: nums = [4,5,6,7,0,1,2], target = 3
Output: -1
Example 3:

Input: nums = [1], target = 0
Output: -1"

Github: https://github.com/xavierelon1
Github HackerRank Solutions: https://github.com/XavierElon1/Hacker...
Github Leetcode Solutions: https://github.com/XavierElon1/LeetCo...
Facebook:   / xavier.hollingsworth.3  
Instagram:   / xavierelon  
LinkedIn:   / xavier-hollingsworth-524144127  
Twitter:   / elon_xavier  


En esta página del sitio puede ver el video en línea LeetCode 33 | Search in Rotated Sorted Array | Algorithm Explained (Java) de Duración hora minuto segunda en buena calidad , que subió el usuario Xavier Elon 16 marzo 2020, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 361 veces y le gustó 11 a los espectadores. Disfruta viendo!