随笔分类 - 算法相关
每天一条leetcode,爽歪歪
摘要:正常的输入 C++: python: 按行输入 C++: python: C++中想要删掉一个string中的空格号 C++ include cout
阅读全文
摘要:提到DFS,我们首先想到的是对树的DFS,例如下面的例子:求二叉树的深度 int TreeDepth(BinaryTreeNode* root){ if(root==nullptr)return 0; int left=TreeDepth(root->left); int right=TreeDep
阅读全文
摘要:题目是: Given a string s,partition s such that every substring of the partition is a palindrome Return tthe mininum cuts needed for a palindrome partitio
阅读全文

浙公网安备 33010602011771号