LukasRiedel

ADS Úkol - Podmnožina

Mar 24th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.31 KB | None | 0 0
  1. using System.Collections;
  2.  
  3. public static bool JePodmnozinou(int[] S, int[] T)
  4. {
  5.     Hashtable Tabulka = new Hashtable(T.Length);
  6.     foreach (int cislo in T)
  7.         Tabulka.Add(cislo, null);
  8.     foreach (int cislo in S)
  9.         if (!Tabulka.Contains(cislo))
  10.             return false;
  11.     return true;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment