/**
 * Given a string, finds characters in the string based on the negative range limit.
 *
 * @param string A string from which characters need to be found
 * @param n An integer representing the negative range limit
 * @return A list of characters found within the negative range limit
 *
 * Example:
 * findCharacters("Hello", -3) -> ['o', 'l', 'l', 'e', 'H']
 */
fun findCharacters(string: String, n: Int): List<Char> {

    val characterList = mutableListOf<Char>()
    for (i in -1 downTo n + 1) {
        characterList.add(string[i])
    }
    return characterList
}
/**
 * Given a string, finds characters in the string based on the negative range limit.
 *
 * @param string A string from which characters need to be found
 * @param n An integer representing the negative range limit
 * @return A list of characters found within the negative range limit
 *
 * Example:
 * findCharacters("Hello", -3) -> ['o', 'l', 'l', 'e', 'H']
 */
fun findCharacters(string: String, n: Int): List<Char> {
/**
 * Given a string, finds characters in the string based on the negative range limit.
 *
 * @param string A string from which characters need to be found
 * @param n An integer representing the negative range limit
 * @return A list of characters found within the negative range limit
 *
 * Example:
 * findCharacters("Hello", -3) -> ['o', 'l', 'l', 'e', 'H']
 */
fun findCharacters(string: String, n: Int): List<Char> {

    val characterList = mutableListOf<Char>()
    for (i in -1 downTo n + 1) {
        characterList.add(string[i])
    }
    return characterList
}