Ad
Code
Diff
  • import static java.util.stream.IntStream.of;
    import static java.util.stream.Collectors.toSet;
    
    interface Kata {
      static int[] remove(int[] array, int[] exclude) {
        var forRemoval = of(exclude).boxed().collect(toSet());
        return of(array).filter(i -> !forRemoval.contains(i)).toArray();
      }
    }
    • import static java.util.stream.IntStream.of;
    • import static java.util.stream.Collectors.toSet;
    • interface Kata {
    • static int[] remove(int[] array, int[] exclude) {
    • var forRemoval = of(exclude).boxed().toList();
    • var forRemoval = of(exclude).boxed().collect(toSet());
    • return of(array).filter(i -> !forRemoval.contains(i)).toArray();
    • }
    • }
Code
Diff
  • class Kata
    {
      
      private static readonly string LANGUAGE = "C#";
      
      public static void Main()
      {
        System.Console.WriteLine($"Hello, {LANGUAGE}!");
      }
      
    }
    • class Kata
    • {
    • private static string LANGUAGE = "C#";
    • private static readonly string LANGUAGE = "C#";
    • public static void Main()
    • {
    • System.Console.WriteLine($"Hello, {LANGUAGE}!");
    • }
    • }