您现在的位置是:
首页
>
标签 “LeetCode刷题总结” 相关程序员文章站
LeetCode刷题总结(持续更新中。。。)
1、回文字符返回字符串是否回文结构def huiwen(str): if len(str) == 1: return True elif len(str) == 2: return str[0]==str [-1] else: return...
程序员文章站2024-03-16Python内置函数 Leetcode刷题总结(持续更新)
str.isalpha(): 判断字符串是否只由字母组成^异或 1<<5,相当于把第5位从0变到1,从1变到0, 即实现大小写的转换0 ^ 0=0 , 0 ^ 1= 1 , 1 ^ 0= 1 , 1 ^ 1= 0ord()返回对应的ASCII码chr()返回对应的ASCII字符itert...
程序员文章站2022-07-02leetcode刷题思路总结_对称的二叉树
class Solution {public: bool isSymmetric(TreeNode* root) { if(!root) return true; return dfs(root->left,root-...
程序员文章站2022-05-06前端学习-刷题总结-leetcode88题的思考之splice()和sort()
leetcode88题的思考之splice和sortsplicesort小记splice1.splice会影响原数组,但返回的值是切割得到的值,而原数组是切割后剩下的值const arr=[1,2,3,0,0,0]console.log(arr.splice(0,3))//[1,2,3]consol...
程序员文章站2022-04-26