HashTable-FindFirstRecurringChar

Run Settings
LanguageC#
Language Version
Run Command
using System; using System.Collections; class Program { static void Main(string[] args) { int[] arr = { 1, 5, 8, 5, 1, 8, 8, 7, 4, 4, 10 }; Console.Write(FindFirstRecurringChar(arr)); } static int FindFirstRecurringChar(int[] arr) { Hashtable h = new Hashtable(); for (int i = 0; i < arr.Length; i++) { if(h.ContainsKey(arr[i])) { return arr[i]; } h[arr[i]] = arr[i]; } return 0; } }
Editor Settings
Theme
Key bindings
Full width
Lines