Jobs
Interviews

Solve Case-Insensitive Stable Sort using Python Language

Solve Case-Insensitive Stable Sort using Python to enhance your skills with python coding practice , master coding concepts, and prepare for interviews with practical exercises and detailed solutions.

Case-Insensitive Stable Sort

Difficulty : Easy

Categories :

  • Sorting algorithms

Given an array of strings containing names, sort them in a case-insensitive manner. If two strings are equal when compared case-insensitively, maintain their original order (stable sort).

Constraints:

  • 1 ≤ array.length ≤ 100
  • 1 ≤ name.length ≤ 20
  • Names contain only English letters
  • Must perform stable sorting

Examples:

Input: ["Tom", "alice", "Bob", "aLice"]
Output: ["alice", "aLice", "Bob", "Tom"]
Explanation: Sorted case-insensitively, maintaining original order of "alice" and "aLice"
Input: ["Zebra", "zebra", "cat"]
Output: ["cat", "Zebra", "zebra"]
Explanation: "cat" comes before both "Zebra" and "zebra"

Coding works best on a laptop or desktop, with a keyboard and a wider editor. You can read the problem here and solve it there.

Problem Solving

Input

What You'll Find Here

Interactive Exercises Practice coding with problems designed for beginners and experts.

Step-by-Step Solutions Understand every step of the solution process.

Real-World Scenarios Apply your skills to real-world problems and boost your confidence.

Choose from the following categories