What is the data structure used by the brain to store data? As a computer science undergraduate I was wondering if there are any special data structures used by the brain to save data?

I am especially interested in the hash tables data structure. If data are saved in this type of data structure then you could search, insert and delete them in a short time no matter the size of the data (or technically speaking in O(1)).    

I was wondering if the brain works in the same way or not?  And if it does, how does it?
Memory in the brain isn't super-well understood, so going to the level of "data-structures" isn't really possible with purely biological models. Not that a purely biolgocial description would be very useful anyways. When people ask how the brain works, they typically don't want to be told "molecule A interacts with molecule B, which triggers molecule C".

Since you're coming from computer science, I am going to assume that you're probably more interested in models or the "data-structures" (how to structure data, like a list or a tree) we assign to a brain. One way to build biologically plausible brain models is with the Neurological Engineering Framework (NEF) and there's been a couple data structures based on this that have been used. You can see more detail on this in my other answer "How is memory accounted for in the NEF?"

However, it's important to note that the NEF is a framework, thus much work is being done on implementing more complex data structures than the ones mentioned in that question. In particular, Aaron Voekler has implemented a dynamic hetero-associative memory using the framework, which functions somewhat in the same manner as a hash table.

I hope this answer gives you a good starting point for further investigation.