Home > Back-end >  Order how to use the existing in the table lookup algorithm modified algorithm (for bosses to help)
Order how to use the existing in the table lookup algorithm modified algorithm (for bosses to help)

Time:10-09

//values specified in the linear table to retrieve the data elements of x
Public int locateData (int x) {
int i;
for (i=0; I & lt; This. Len; I++) {
If (this. Data [I]==x)
Return the I + 1;
}
return -1;
}

Public int the modify (int x, int y) {//modify data element to the value of x to y, the return value 0 means change failure, 1 modify success

//please complete the method

}

CodePudding user response:

Please help ohoo
  • Related