The pits encountered when writing algorithmic problems in java and JS

All are pits, the more you step on, the harder you are;;; Come on! ! !

1. Judge whether two characters (not case sensitive) are the same in java. Use char + 32 || char-32 to judge. If java is converted to lowercase, an error will be reported

Not in Js, it can only be judged by converting it to lowercase;

2. When JS reads the input, it should loop through the first line of reading, and wrap all other codes in it, in order to ensure that all test cases can be read in a loop

 

Guess you like

Origin blog.csdn.net/weixin_37719279/article/details/82193376
Recommended