adspace


Assume an array of structure is in order by studentID field
of the record, where student IDs go from 101 to 500. Write
the most efficient pseudocode algorithm you can to find the
record with a specific studentID if every single student ID
from 101 to 500 is used and the array has 400 elements.

Write the most efficient pseudocode algorithm you can to
find a record with a studentID near the end of the IDs, say
in the range from 450 to 500, if not every single student
ID in the range of 101 to 500 is used and the array size is
only 300

Answer Posted / Romesh Kumar Singh

[Pseudocode:ntfunction findNearEndStudentRecord(studentArray, startID, endID) {nttfor i from (N-1) down to 0 {ntttif (studentArray[i].studentID >= startID && studentArray[i].studentID <= endID) return studentArray[i];ntt}nttreturn null;n}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

daily Routine of father

1485


How c functions prevents rework and therefore saves the programers time as wel as length of the code ?

1165


What is the latest version on c++?

1209


Can union be self referenced?

1267


What character terminates all character array strings a) b) . c) END

1397