๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.63K subscribers
5.61K photos
3 videos
95 files
10.6K links
๐ŸšฉMain Group - @SuperExams
๐Ÿ“Job Updates - @FresherEarth

๐Ÿ”ฐAuthentic Coding Solutions(with Outputs)
โš ๏ธDaily Job Updates
โš ๏ธHackathon Updates & Solutions

Buy ads: https://telega.io/c/cs_algo
Download Telegram
๐ŸŽ๐ŸŽ‰ Giveaway Time ๐ŸŽŠ๐ŸŽ

๐Ÿ“ŒWhat will you get in this giveaway?
30 X StupidTechy.Me VIP Membership Accounts

๐Ÿ“ŒHow to participate in the giveaway?
Make sure that you have an account on StuipdTechy.
You have to invite your friends/classmates to our group (@sup777exams).

โœ… Winner will be selected Randomly.

๐Ÿ“ŒWhen is our Giveaway?
A giveaway will happen when we reach 4k members in our group.

๐ŸงIf you have any query related to Giveaway... Ping my Bot ๐Ÿ‘โ€๐Ÿ—จ @sup777exams_bot
๐ŸŽ๐ŸŽ‰ Giveaway Time ๐ŸŽŠ๐ŸŽ

๐Ÿ“ŒWhat will you get in this giveaway?
30 X StupidTechy.Me VIP Membership Accounts

๐Ÿ“ŒHow to participate in the giveaway?
Make sure that you have an account on StuipdTechy.
You have to invite your friends/classmates to our group (
@sup777exams).

โœ… Winner will be selected Randomly.

๐Ÿ“ŒWhen is our Giveaway?
A giveaway will happen when we reach 4k members in our group.

๐ŸงIf you have any query related to Giveaway... Ping my Bot ๐Ÿ‘โ€๐Ÿ—จ @sup777exams_bot
โœ…โœ… Break the Palindrome

class Solution {
public String breakPalindrome(String palindrome) {
// If empty or of length 1 => return empty
if (palindrome.length() <= 1) {
return "";
}
char[] chars = palindrome.toCharArray();
for (int i = 0; i < chars.length; i++) {
if (chars[i] != 'a') {
// Skip if the string is of odd length and it is the middle index
if (palindrome.length() % 2 != 0 && i == palindrome.length() / 2) {
continue;
}
chars[i] = 'a';
break;
}
// If all chars all 'a' update last char to 'b'
if (i == chars.length - 1) {
chars[i] = 'b';
}
}
return String.valueOf(chars);
}
}
๐Ÿ‘1