How to invert a dictionary? <p>I'm working with a custom language based on C with limited resources (some C-like, others added up based on other languages). I have only non-dynamic arrays and matrices, I also have dictionaries, stacks, queues and heaps, if's, for, and while cicles.</p> <p>My problem is: having a dictionary with key: 'a' (int) and value: 'b'(int), and using these non-dynamic structures, how could I invert the dictionary in a simple way, that I'd have a new dictionary as following: key: 'b'(int), value: 'a'(int[ ])</p>