MCPcopy Index your code
hub / github.com/careercup/ctci / canBeAbove

Method canBeAbove

java/Chapter 9/Question9_10/Box.java:20–28  ·  view source on GitHub ↗
(Box b)

Source from the content-addressed store, hash-verified

18 }
19
20 public boolean canBeAbove(Box b) {
21 if (b == null) {
22 return true;
23 }
24 if (width < b.width && height < b.height && depth < b.depth) {
25 return true;
26 }
27 return false;
28 }
29
30 public String toString() {
31 return "Box(" + width + "," + height + "," + depth + ")";

Callers 2

createStackRMethod · 0.80
createStackDPMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected