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 5
5
public class Solution {
6
6
7
7
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' );
10
10
}
11
11
12
12
public String lexicographicallySmallestString (String sIn ) {
@@ -30,8 +30,8 @@ public String lexicographicallySmallestString(String sIn) {
30
30
if (remTable [idx ][j ]) {
31
31
continue ;
32
32
}
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 ]) {
35
35
remTable [idx ][j ] = true ;
36
36
break ;
37
37
}
You can’t perform that action at this time.
0 commit comments