Get Random 2N Strings


  • 0
    J

    Given a set of m strings, return a randomized array of 2n strings in which each element chosen to be in the array appears exactly twice. Assume n < m. For example, from [a,b,c,d] with n=3, return [c,d,a,a,c,d].

    List getRandom2NStrings (int n, Set<String> strings){
        
    }

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.