4 ms·
Yes, the code style is dictated by leetcode. It feels a bit "Java" to use a class instead of free function, but seems pretty irrelevant in the grand scheme of
by mcpherrinm 7y ago
Yes, the code style is dictated by leetcode. It feels a bit "Java" to use a class instead of free function, but seems pretty irrelevant in the grand scheme of things.
The starting point for this problem is provided as:
class Solution {
public:
int maxArea(vector<int>& height) {
}
};
I saw this problem in an interview about a decade ago, at one of the larger tech companies. Google or something. Supposedly Google doesn't do "algorithmic" interviews like this anymore.
- krackers 7y ago> Supposedly Google doesn't do "algorithmic" interviews like this anymore. That's not true. In fact if anything that's all they do now.
- ThePadawan 7y ago> That's not true. In fact if anything that's all they do now. That's not true. It is however, still a majority of what they do.
- Infinitesimus 7y agoOh they do. Some ppl have had this exact question in recent times per leetcode tags