Загрузка...

Case-specific Sorting of Strings solved in JS | GeeksforGeeks | POTD |Streak 201 | Thu, 19 Jun 2025

Given a string s consisting of only uppercase and lowercase characters. The task is to sort uppercase and lowercase letters separately such that if the ith place in the original string had an Uppercase character then it should not have a lowercase character after being sorted and vice versa.

Examples :

Input: s = "GEekS"
Output: EGekS
Explanation: Sorted form of given string with the same case of character will result in output as EGekS.
Input: s = "XWMSPQ"
Output: MPQSWX
Explanation: Since all characters are of the same case We can simply perform a sorting operation on the entire string.

#coding #GeeksforGeeks #ProblemOfTheDay #JavaScript

---
introduction:
name: "Jagadeesh Kumar S"
contact: "+91 73972 85837 | jagadeesh_2k17@proton.me"
description: "A problem-solving enthusiast passionate about coding challenges."

technical_achievements:
- "Solved 100+ daily coding challenges on GeeksforGeeks"
- "Ranked in the top 130 on SRM Institute of Science and Technology's GeeksforGeeks leaderboard"
- "Maintained a 100+ day streak for Problem of the Day"

github:
contributions: "Solutions available at https://github.com/JKS-sys/Solution-To-Problem-Of-The-Day-at-geeksforgeeks.org"
---

Видео Case-specific Sorting of Strings solved in JS | GeeksforGeeks | POTD |Streak 201 | Thu, 19 Jun 2025 канала NewsCraft Studio
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять