Taro Logo

Senior Software Engineer Interview Experience - San Mateo, California

March 1, 2009
Neutral ExperienceNo Offer

Process

After asking about my previous work experiences, the interviewer asked just one single coding problem. No other skills were asked. The assessment was completely dependent on coding.

Coding Problem: Implement hasNext() and next() methods for a class that contains a collection of collections. (The main collection must not be null or empty, and sub-collections must not be null.)

Answer: I received several hints from the interviewer. I believe I didn't get the offer because I didn't finish the coding by myself, even though we discussed it nicely.

java public class CollectionOfCollections { private Iterator mainIter; private Iterator subIter;

CollectionOfCollections(Collection col) {
    mainIter = col.iterator();
    subIter = mainIter.next().iterator();
}

public boolean hasNext() {
    if (subIter.hasNext()) {
        return true;
    }

    while (mainIter.hasNext()) {
        subIter = mainIter.next().iterator();
        if (subIter.hasNext()) {
            return true;
        }
    }
    return false; // Added return statement
}

public Object next() throws NoSuchElementException {
    if (hasNext()) {
        return subIter.next();
    }

    throw new NoSuchElementException(); // Corrected syntax
}

}

Questions

Coding hasNext() and next() methods for a class that contains a Collection of Collections.

Requirements:

  • The main collection must not be null or empty.
  • Sub-collections must not be null.

Was this helpful?

Interview Statistics

The following metrics were computed from 7 interview experiences for the Guidewire Senior Software Engineer role in San Mateo, California.

Success Rate

29%
Pass Rate

Guidewire's interview process for their Senior Software Engineer roles in San Mateo, California is very selective, failing most engineers who go through it.

Experience Rating

Positive43%
Neutral29%
Negative29%

Candidates reported having good feelings for Guidewire's Senior Software Engineer interview process in San Mateo, California.

Guidewire Work Experiences