0

In an assignment involving cyclic shift hash codes, the instructions include the following code:

int hashCode(const char* p, int len) 
{ unsigned int h = 0;
  for (int i = 0; i < len; i++)
  { h = (h << 5)|(h >> 27);        
    h += (unsigned int)p[i];      
  }
  return h;
}

What do the >> and << in line 4 mean?

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by Daria Shmaria
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.