摘要: [52. N皇后 II](https://leetcode-cn.com/problems/n-queens-ii/) 给同学讲一下思考dfs的方法论 ## 1. 思考dfs每个状态的含义 dfs(row)代表当前在第row+1行放置皇后 ```cpp class Solution { public 阅读全文
posted @ 2021-04-01 19:32 rxh1999 阅读(178) 评论(0) 推荐(0)
摘要: [88. 合并两个有序数组](https://leetcode-cn.com/problems/merge-sorted-array/) 双指针,从后向前做 ```cpp class Solution { public: void merge(vector& nums1, int m, vector 阅读全文
posted @ 2021-04-01 16:26 rxh1999 阅读(34) 评论(0) 推荐(0)
摘要: // // Created by rxh1999 on 2021/4/1. // #include<iostream> #include<bits/stdc++.h> using namespace std; void suffixArray(){ string s; cin>>s; s+='$'; 阅读全文
posted @ 2021-04-01 12:37 rxh1999 阅读(47) 评论(0) 推荐(0)