MCPcopy Create free account
hub / github.com/Tiwarishashwat/InterviewCodes / isValid

Method isValid

ConstructSmallestNumberFromDIString.java:34–36  ·  view source on GitHub ↗
(int lastDigit, int currentDigit, char condition)

Source from the content-addressed store, hash-verified

32 }
33
34 private boolean isValid(int lastDigit, int currentDigit, char condition) {
35 return (condition == 'I' && lastDigit < currentDigit) || (condition == 'D' && lastDigit > currentDigit);
36 }
37}

Callers 1

backtrackMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected