Question: Please Use the Cyclic Shift Hash Code below and WRITE A CODE with 1) no shift, 2) shift 3, 3) shift 5 on
Please Use the "Cyclic Shift Hash Code" below and WRITE A CODE with 1) no shift, 2) shift 3, 3) shift 5 on each of these strings abcde bacde abcdx. Please output the keys (numbers) igrouped according to shift number and identify which string the key is paired with. C++ language
Please make sure your code is correct and runs and I promise to give you a thumbs up
CYCLIC SHIFT CODE :
#includeusing namespace std; int main() { // n -bit cyclic shift n = 5 unsigned int h = 0; string A = "pots"; for(int i=0; i<4; i++) { h = (h << 5) | (h >> 27); // bitwise OR n left 32-n right h =h +(unsigned int) A[i]; } cout<> 27); // bitwise OR n left 32-n right h = h + (unsigned int)B[i]; } cout<
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
