Answered step by step
Verified Expert Solution
Question
1 Approved Answer
** Given a String array, return an String array with duplicate Strings removed if the array contains duplicate values. Note: Capital letters count removeDuplicateStrings({a}) ->
** Given a String array, return an String array with duplicate Strings removed if the array contains duplicate values. Note: Capital letters count removeDuplicateStrings({"a"}) -> {"a"} removeDuplicateStrings({"a", "b", "c", "d"}) -> {"a", "b", "c", "d"} removeDuplicateStrings({"a", "a"}) -> {"a"} removeDuplicateStrings({"A", "a"}) -> {"A", "a"} removeDuplicateStrings({"these", "are", "the", "times"}) -> {"these", "are", "the", "times"} removeDuplicateStrings({"these", "times", "are", "the", "times", "they", "are"}) -> {"these", "times", "are", "the", "they"}) **/ public static String[] removeDuplicateStrings(String[] strings) { //your code here return strings; }
/** Given an array of Strings, return the first String in alphabetical order. Note: Capital letters count firstString({"fizz", "buzz", "bang", "boom"}) -> "bang" firstString({"Fizz", "buzz", "bang", "boom"}) -> "fizz" firstString({"1", "2", "$$#%^", "pico"}) -> "$$#%^" firstString({"5", "3", "6", "1", "4"}) -> "1" **/ public static String firstString(String[] strings) { //your code here return ""; } //java programming
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started