Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/randhir200/string-modification-iii
You are given a string, whose length is stored in a variable with the nameN The string is stored in a variable with the namestr It is given that the length of the string is always divisible by 3 You have to create a new modified string, such that individual parts of the original string of length 3, are reversed For example, consider the given string isstr = abcdefghi, andN = 9. In this case, there are 3 parts of the string with length 3 The first part isabc, the second part isdef, and the third part isghi. Now, you have to reverse all the three parts, and combine them in the same order as before Therefore, the first part after reversing iscba, second part after reversing isfed, and the third part after reversing isihg Combining the three parts, the new modified string becomescbafedihg, which is the required answer
https://github.com/randhir200/string-modification-iii
Last synced: 2 days ago
JSON representation
You are given a string, whose length is stored in a variable with the nameN The string is stored in a variable with the namestr It is given that the length of the string is always divisible by 3 You have to create a new modified string, such that individual parts of the original string of length 3, are reversed For example, consider the given string isstr = abcdefghi, andN = 9. In this case, there are 3 parts of the string with length 3 The first part isabc, the second part isdef, and the third part isghi. Now, you have to reverse all the three parts, and combine them in the same order as before Therefore, the first part after reversing iscba, second part after reversing isfed, and the third part after reversing isihg Combining the three parts, the new modified string becomescbafedihg, which is the required answer
- Host: GitHub
- URL: https://github.com/randhir200/string-modification-iii
- Owner: Randhir200
- Created: 2022-04-25T18:38:33.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-04-25T18:41:15.000Z (over 2 years ago)
- Last Synced: 2024-11-06T03:46:56.330Z (about 2 months ago)
- Language: JavaScript
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files: