Experiment 1.2
Experiment 1.2
2
Student Name: Suhani nayak UID: 21BET1061
Branch: BE-CSE Section/Group: CC-601B
Semester: 6 Date of Performance:23-01-2024
Subject Name: Advance Programming lab
Subject Code:21ITH-251
2. Objective:
● Given two strings s and goal, return true if and only if s can become goal after some number of
shifts on s.A shift on s consists of moving the leftmost character of s to therightmost position.For
example, if s = "abcde", then it will be "bcdea"after one shift.
● Given two strings needleand haystack, return the index of the first occurrence of
needlein haystack, or -1if needleis not part of haystack.