We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Right. So the person who wrote this 'test' doesn't seem to understand what 8 pixel connectivity is. Properly, it is a pixel that has a neighbor in all four diagonals, both horizontals, and both verticals. The example given should not return 2, it should return 0. The author also does not understand 4 pixel connectivity either as the previous problem should not return 7. This is an embarrassment to the site that these problems are still up. This is why my employer and others are turning to better 'test' sites for prospetive employees.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Image Segmentation #2
You are viewing a single comment's thread. Return to all comments →
Right. So the person who wrote this 'test' doesn't seem to understand what 8 pixel connectivity is. Properly, it is a pixel that has a neighbor in all four diagonals, both horizontals, and both verticals. The example given should not return 2, it should return 0. The author also does not understand 4 pixel connectivity either as the previous problem should not return 7. This is an embarrassment to the site that these problems are still up. This is why my employer and others are turning to better 'test' sites for prospetive employees.