Skip to content

Commit a98fc9b

Browse files
committed
#line 59 updated st3TotalHeight to st1TotalHeight
1 parent b99485a commit a98fc9b

File tree

1 file changed

+1
-1
lines changed
  • HackerRankDashboard/CoreCS/Algorithms/src/main/java/com/javaaid/hackerrank/solutions/algorithms/greedy

1 file changed

+1
-1
lines changed

HackerRankDashboard/CoreCS/Algorithms/src/main/java/com/javaaid/hackerrank/solutions/algorithms/greedy/EqualStacks.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ static int equalStacks(int[] h1, int[] h2, int[] h3) {
5555
// removing its top element.
5656
if (st1TotalHeight >= st2TotalHeight && st1TotalHeight >= st3TotalHeight)
5757
st1.pop();
58-
else if (st2TotalHeight >= st3TotalHeight && st2TotalHeight >= st3TotalHeight)
58+
else if (st2TotalHeight >= st1TotalHeight && st2TotalHeight >= st3TotalHeight)
5959
st2.pop();
6060
else if (st3TotalHeight >= st2TotalHeight && st3TotalHeight >= st1TotalHeight)
6161
st3.pop();

0 commit comments

Comments
 (0)