Driver Code
public static void Main ( ) { int [ ] arr = { 12 , 1 , 12 , 3 , 12 , 1 , 1 , 2 , 3 , 2 , 2 , 3 , 7 } ; int n = arr . Length ; Console . WriteLine ( " The ▁ element ▁ with ▁ single ▁ " + " occurrence ▁ is ▁ " + getSingle ( arr , n ) ) ; } }