Skip to content

Instantly share code, notes, and snippets.

View raviLakhtariya's full-sized avatar

ravi lakhtariya raviLakhtariya

View GitHub Profile
@raviLakhtariya
raviLakhtariya / gist:482b5adf9203fd01227fb3e41a16a1f4
Created August 14, 2021 05:37
now i have one array like = [1,2,3,4,5,6,7] and user will input the value like 3 then we first search the index of value, which entered by user...and we generate new array like = [3,4,5,6,7,1,2]
class ViewController: UIViewController {
var array = ["R","a","v","i","i","o","s"]
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
getNewArray(input: "v")
getNewArray1(input: "v")
}