Advertisement
Guest User

Untitled

a guest
Nov 14th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. void init(int size);
  4. int sling(char[] name, int size); // hashing function
  5. void slash(int size); // rehashing function
  6. int slide(int hash); // nextOpen
  7. int scatter(char chunk); // converts lowercase ascii char to int in range [0, 25]
  8.  
  9. void show();
  10.  
  11. int main(){
  12. }
  13.  
  14. int sling(char[] name, int size) {
  15. smothered = scatter(name[0]) * 676;
  16. covered = scatter(name[1]) * 26;
  17. slung = smothered + covered + scatter(name[2]);
  18. grease = 200/(size/100);
  19. return slung/grease;
  20. }
  21.  
  22. int scatter(char chunk) {
  23. return chunk - 'a';
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement