Cuckoo hashing insertion helper routine
1. Declare rehashes variable to track attempts to rehash
2. Check if any valid positions are empty, place item in first available position if so
3. Evict one of the existing items if no empty positions
4. Avoid evicting first, last, or in sequence items
5. Maintain last evicted position, select new random item if last evicted
6. Limit rehash loop to 5 iterations