登录
  • #美国面经
  • #面试经验
  • #工程类
  • #fidessa

菲德萨OA

lolmeowqt
106
0
Fidesa OA

Test two questions online:

Airport Scheduling Problem

/ * At an airport you have a timetable for arrivals and departures.

* You need to determine the minimum number of gates you * d need to provide so that all the planes can be placed at a gate as per their schedule.

* The arrival and departure times for each plane are presented in two arrays, sorted by arrival time, and you're told the total number of flights for the

* day. Assume that no planes remain overnight at the airport; all fly in and back out on the same day. Assume that if a plane departs in the same minute as another plane arrives, the arriving plane takes priority (ie you'll still need the gate for the departing plane). Write a function that returns

* the minimum number of gates needed for the schedules you're given.

* Example:

* arrQ = {900, 940, 950, 1100,1500,1800}

* depQ = {910,1200,1120, 1130,1900, 2000}

* flights = 6

[mw_shl_code = cpp, true] #include <algorithm>

#include <queue>

using namespace std;

class MinimumGates {



本帖隐藏的内容需要积分高于 188 才可浏览,点击前往一亩三分地论坛阅读

} else {

stack.push (str. at (i));

}

}

if (stack.empty ())

return str.size ()-1;

else

return res;

}

bool isUpperCase (char ch) {

string str = "ABCDEFGHIGKLMNOPQRSTUVWXYZ";

int pos = str.find (ch);

if (pos> = 0 && pos <26)

return true;

else

return false;

}

};

[/ mw_shl_code]

Spark Spark Hire Quesions:



Why Fidessa?

Most Challenging Project you faced
0条回复
热度排序

发表回复