You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/java/com/fishercoder/solutions/_71.java
+2
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,8 @@ public String simplifyPath(String path) {
33
33
publicstaticclassSolution2 {
34
34
/**
35
35
* This solution doesn't vary too much from the above one, except in that it's using pollLast() and addLast() instead of pop() and push().
36
+
* Key notes:
37
+
* if using pollLast, then it must be consistent across all calls, including peekLast() and addLast(), cannot mix with pop() and push(), otherwise, unexpected/undesired results will happen.
0 commit comments