Given a string palindrome that is a palindrome, you need to replace exactly one character with any lowercase English letter such that the resulting string is no longer a palindrome. The resulting string should be the lexicographically smallest string possible. If it is not possible to change the string to make it non-palindromic, return an empty string.
You are given two strings s and t of the same length. In one step, you can choose any character of t and replace it with another character. Return the minimum number of steps to make t an anagram of s.
Given a string s consisting only of characters ‘a’, ‘b’, and ‘c’, your task is to find the number of substrings that contain at least one occurrence of each of the characters ‘a’, ‘b’, and ‘c’.
In a special ranking system, each voter assigns a rank to all participating teams in a competition. The rankings are based on the most first-place votes, then second-place votes, and so on. If there is still a tie, teams are ranked alphabetically.
You are tasked with building a system to track customer travel times within an underground railway network. The system should calculate the average time taken to travel between two stations based on previous trips. Implement the UndergroundSystem class with the following methods.