2 ms·
For me implementing the data structure and it's operations made the difference between shallow and deep knowledge. There are a lot of data structures and I did
by croo 7y ago
For me implementing the data structure and it's operations made the difference between shallow and deep knowledge. There are a lot of data structures and I did not see anyone post a basic list so let me provide one, because once you know what you should seek things will be much easier.
Data structures:
- linked list (single,double)
- array list
- hash map with different implementations
- binary tree(and tree traversing, depth/breadth first search)
- red-black tree
- self balancing tree
- stack
- heap
- queue
- set (with funny set operations like intersection)
- B and B* tree
Read about their strengths and weaknesses.
With every data structure comes operations. More or less the same with a few speciality but their implementations are vastly different. You should try to implement the same operations at every data structure:
- Find an element
- Find min/max
- Add / delete an element
- Sort the data
Take time to implement the standard sorting algorithms for a list to understand the speed implications: quicksort, bubblesort, heapsort, radix sort, bucket sort
If you look for other algorithmic challenges I suggest checking out graph algorithms. Dijkstra and A* are the most famous.