XYZ CODE
Learning java, javascript, HTML, CSS, shell, python with fun javascript games and videos
Site Search:
home
Java
Basic
Advanced
Java Concurrency
Algorithm
Python Algorithm
Java Algorithm
AI
System Design
Tools
Splunk
Dynamic Web Project
soap web service
misc
Games
Resources
Blogger Tips
xyznetwork
IT Security
xyzstar
misc
books
About
maze quiz 8
public static int rank(int[] a, int key) {
int lo = 0;
int hi = a.length - 1;
while(lo <= hi) {
//what is missing here?
if(key < a[mid]) hi = mid - 1;
else if(key > a[mid] lo = mid + 1;
else return mid;
}
return lo;
}
help!
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment