{"id":22558209,"url":"https://github.com/niceleader/zadanie","last_synced_at":"2025-03-28T11:41:10.924Z","repository":{"id":156454741,"uuid":"591069612","full_name":"NiceLeader/zadanie","owner":"NiceLeader","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-19T21:23:39.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-02T12:15:32.385Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NiceLeader.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-19T21:18:40.000Z","updated_at":"2023-05-14T10:58:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"951b72ac-0276-4f1c-9724-24faf5c53964","html_url":"https://github.com/NiceLeader/zadanie","commit_stats":null,"previous_names":["niceleader/zadanie"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiceLeader%2Fzadanie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiceLeader%2Fzadanie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiceLeader%2Fzadanie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiceLeader%2Fzadanie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NiceLeader","download_url":"https://codeload.github.com/NiceLeader/zadanie/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246025604,"owners_count":20711573,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-07T20:12:38.508Z","updated_at":"2025-03-28T11:41:10.901Z","avatar_url":"https://github.com/NiceLeader.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zadanie_intern\nTask:\nYou have two strings as an input , 3 \u003e n \u003e 5000, where n is a string length\nOutput is a boolean, which indicates if these two string are anagrams(case insensitive)\nWrite unit tests that covers at least 80% cases\nTech stack: Java 8+, JUnit 5\n\nDescription in ENG:\nThe code I provided is an implementation of a method in Java that takes in two strings and returns a boolean indicating whether they are anagrams (case-insensitive).\nThe method takes in two arguments of type String - s1 and s2. Then it converts both strings to lowercase using the toLowerCase() method. Then it creates arrays of characters s1Chars and s2Chars that contain the individual characters of the strings s1 and s2. The next step is to sort both arrays using the sort() method.\nThen it compares both arrays of characters using the equals() method of the Arrays class and returns the result of that comparison.\nIf both arrays are identical, it means that the strings s1 and s2 are anagrams, and the method returns true. Otherwise it returns false.\nIn the test file AnagramCheckerTest, there are unit tests that test different scenarios. Each test calls the isAnagram() method with different parameters and checks if the returned result is consistent with the expectation.\n\nDescription in PL:\nKod, który przedstawiłem, jest implementacją metody w języku Java, która przyjmuje dwa ciągi znaków i zwraca wartość boolowską wskazującą, czy są one anagramami (niezależnie od wielkości liter).\nMetoda przyjmuje dwa argumenty typu String - s1 i s2. Następnie oba ciągi znaków zamienia na małe litery za pomocą metody toLowerCase(). Następnie tworzy tablice znaków s1Chars i s2Chars, które zawierają poszczególne znaki z ciągów s1 i s2. Kolejnym krokiem jest sortowanie obu tablic za pomocą metody sort().\nNastępnie porównuje obie tablice znaków za pomocą metody equals() z klasy Arrays i zwraca wynik tego porównania. Jeśli obie tablice są identyczne, oznacza to, że ciągi znaków s1 i s2 są anagramami i metoda zwraca true. W przeciwnym razie zwraca false.\nW pliku testowym AnagramCheckerTest, znajdują się testy jednostkowe, które testują różne scenariusze. Każdy test wywołuje metodę isAnagram() z różnymi parametrami i sprawdza czy zwracany wynik jest zgodny z oczekiwaniem.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniceleader%2Fzadanie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniceleader%2Fzadanie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniceleader%2Fzadanie/lists"}