Java Arraylist Set Add Function In C