I am new to Go language and troubling in the code to find the unique elements in the go.
var arr [10]string
arr[0]="table"
arr[1]="chair"
arr[2]="table"
arr[3]="table"
arr[4]="chair"
arr[5]="bench"
arr[6]="table,chair"
arr[7]="bench,chair"
arr[8]="chair,table,bench"
arr[9]="car"
The output should be like:
table
chair
bench
car
I am really stuck on this. how to get the unique elements from the above array. The array contains comma seperated values also but i need to print only the unique elements.
Pls someone help me on this.
Thanks for advance.