Invert Case
CodeChefOpen on judge ↗
The founder of Sarma Templeton Investments wanted to test the skill of students in string operations. The question is, you are given a string $S$, you need to check whether $S$ is not empty and $S$ contains only non negative integers and alphabets. If yes, change the lowercase alphabets in $S$ to uppercase and the uppercase alphabets to lowercase and output the string. If not just output $-1$. Sol
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start