View the step-by-step solution to:

public void blackenNorthWestQuadrant() { if (this.leaf) { if (this.size > 1) { this.

Dear tutors

please help me with this, what is the run time for this method(big O)

Thank you so much!


public void blackenNorthWestQuadrant() {

if (this.leaf) {

if (this.size > 1) {

this.northWest = new QuadtreeBitmap(this.x, this.y, this.size / 2, this.colour);

this.northEast = new QuadtreeBitmap(this.x + this.size / 2, this.y, this.size / 2, this.colour);

this.southWest = new QuadtreeBitmap(this.x, this.y + this.size / 2, this.size / 2, this.colour);

this.southEast = new QuadtreeBitmap(this.x + this.size / 2, this.y + this.size / 2, this.size / 2, this.colour);

this.leaf = false;

this.colour = Colour.WHITE;

mergeChildren(this.northWest, Colour.BLACK);

} else {

this.colour = Colour.BLACK;

}

} else {

mergeChildren(northWest, Colour.BLACK);

}

if (this.northWest.leaf && this.northEast.leaf 

&& this.southEast.leaf && this.southWest.leaf) {

if (this.northWest.colour == this.northEast.colour

&& this.southEast.colour == this.northEast.colour

&& this.southWest.colour == this.southEast.colour) {

mergeChildren(this, this.northWest.colour);

}

}

}

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question