Sort by

recency

|

43 Discussions

|

  • + 0 comments

    Here is my haskell solution.

    reduceStr = reverse . foldl (\acc e -> if e `elem` acc then acc else e : acc) []
    main = getLine >>= putStr . reduceStr
    
  • + 0 comments

    scala

    print(readLine().toList.to(collection.mutable.LinkedHashSet).mkString)
    
  • + 0 comments

    Haskell

    main = interact $ nub
    
  • + 0 comments

    f# solution

    open System
    
    [<EntryPoint>]
    let main _ =
        Console.ReadLine()
        |> Seq.toList
        |> List.distinct
        |> List.iter Console.Write
    
        0
    
  • + 0 comments

    Always love to play with strings war. You can solve same problem with multiple solutions. I got that here.