Hi, I have the code copied below. The line in bold has the following error: 'usunPowtorzoneImiona(java.util.Map<java.lang.String,java.lang.String>)' in 'pl.codegym.task.task08.task0817.Solution' cannot be applied to '(java.util.Map<java.lang.String,java.lang.String>, java.lang.String)' Do you know how I can repair it? Please help; I've already spent ages on this task :)
package pl.codegym.task.task08.task0817;

import java.util.*;

Powtórzenia nie są potrzebne

public class Solution {
    public static HashMap<String, String> utworzMap() {
        //tutaj wpisz swój kod
        HashMap<String, String> members = new HashMap<>();
        members.put("Al", "Kazimierz");
        members.put("Ali", "Kazimierz");
        members.put("Alik", "Kazimiera");
        members.put("Alba", "Józef");
        members.put("Aldon", "Katarzyna");
        members.put("Alka", "Barbara");
        members.put("Algowski", "Jan");
        members.put("Alt", "Monika");
        members.put("Altanka", "Franciszek");
        members.put("Alter", "Katarzyna");
        return members;

    public static String[] moveValuesToArray(Map<String, String> map) {
        ArrayList<String> arrayWithValues = new ArrayList<>();
        for (Map.Entry<String, String> pair : map.entrySet()) {

        String[] array = new String[arrayWithValues.size()];
        array = arrayWithValues.toArray(array);
        return array;

    public static void usunPowtorzoneImiona(Map<String, String> mapa) {
        String[] tableWithSortedValues = moveValuesToArray(mapa);

        for (int i = 1; i < tableWithSortedValues.length; i++) {
            if (tableWithSortedValues[i].equals(tableWithSortedValues[i-1])) {
                usunPowtorzoneImiona(mapa, tableWithSortedValues[i]);

    public static void usunElementZMapPoWartosci(Map<String, String> mapa, String wartosc) {
        HashMap<String, String> kopia = new HashMap<String, String>(mapa);
        for (Map.Entry<String, String> para : kopia.entrySet()) {
            if (para.getValue().equals(wartosc)) {

    public static void main(String[] args) {