aakk
BAN USERint number = 1057889;
getColumnHeader(number);
static char[] data = { 'A', 'B', ….. 'Z' }
String getColumnHeader (int number) {
String result = "";
int i = number;
for (; i >= 26; i = i/26) {
result = data[i%26] + result;
}
result = data[i] + result;
return result;
}
class MyComparater {
public int compareTo(int i, int j) {
String a = i.toString();
String b = j.toString();
if (a.length() > b.length()) {
String c = a;
a = b;
b = c;
}
for (int i=0; i<b.length(); i++) {
int mod_i = i % a.length();
if (a.charAt(mod_i) > b.charAt(i)) {
return 1;
}
if (a.charAt(mod_i) < b.charAt(i)) {
return -1;
}
}
return 0;
}
}
Arrays.sort(data_array, new MyComparator());
All below test cases will test correctness of following output
- aakk October 14, 2012*) TIme accuracy (timezone adjustments)
*) Room / Resource reservation accuracy
*) Mandatory / optional attendee accuracy
Tested functions:
*) Make reservation
*) Make reservation at boundary condition
*) Make reservation outside of boundaries
*) Make overlap reservation
*) Make overlap reservation at boundary condition
*) Make overlap reservation outside of boundaries
*) Make large number of overlap reservations
*) Update an reservation
*) Update an reservation multiple times
*) Update overlap reservations
*) Delete reservation
*) Deletep multiple reservations
*) Insert, Update, Delete Reservation in parallel
*) Insert, Update, Delete Reservation in large numbers