File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/main/java/g3501_3600/s3563_lexicographically_smallest_string_after_adjacent_removals Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 55public class Solution {
66
77 private boolean checkPair (char char1 , char char2 ) {
8- int diff_val = Math .abs (char1 - char2 );
9- return diff_val == 1 || (char1 == 'a' && char2 == 'z' ) || (char1 == 'z' && char2 == 'a' );
8+ int diffVal = Math .abs (char1 - char2 );
9+ return diffVal == 1 || (char1 == 'a' && char2 == 'z' ) || (char1 == 'z' && char2 == 'a' );
1010 }
1111
1212 public String lexicographicallySmallestString (String sIn ) {
@@ -30,8 +30,8 @@ public String lexicographicallySmallestString(String sIn) {
3030 if (remTable [idx ][j ]) {
3131 continue ;
3232 }
33- for (int p_split = idx + 1 ; p_split < j ; p_split += 2 ) {
34- if (remTable [idx ][p_split ] && remTable [p_split + 1 ][j ]) {
33+ for (int pSplit = idx + 1 ; pSplit < j ; pSplit += 2 ) {
34+ if (remTable [idx ][pSplit ] && remTable [pSplit + 1 ][j ]) {
3535 remTable [idx ][j ] = true ;
3636 break ;
3737 }
You can’t perform that action at this time.
0 commit comments