Input: nums = [1,2,3,1]
Output: true
Input: nums = [1,2,3,4]
Output: false





  • Link − Each link of a…



Photo by Annie Spratt on Unsplash
const reverse =…




source: https://codepen.io/armyyazilim/pen/Jjooqrj

Michael Horowitz

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store