题目一:

给出两个 非空 的链表用来表示两个非负的整数。其中,它们各自的位数是按照 逆序 的方式存储的,并且它们的每个节点只能存储 一位 数字。

如果,我们将这两个数相加起来,则会返回一个新的链表来表示它们的和。

您可以假设除了数字 0 之外,这两个数都不会以 0 开头。

示例:

输入:(2 -> 4 -> 3) + (5 -> 6 -> 4)
输出:7 -> 0 -> 8
原因:342 + 465 = 807

分析:这道题目是一个链表题,对链表元素相加得出一个新的链表,那么怎么能实现链表元素的相加呢?其实这和我们实现两个数相加很类似,首先应该从个位数开始,如果之和大于10则将向前进一位。

1、创建一个新的链表,用于返回最后相加和的结果,ListNode DummyNode=new ListNode(0);

2、设置一些指向链表的节点,分别指向l1,l2,DummyNode, p1=l1,p2=l2,curr=DummyNode;

3、开始遍历列表,进行求和,首先获取了l1,l2头节点的值,在进行相加  int x=(p1!=null)? p1.val:0;    int y=(p2!=null)? p2.val:0;   int sum=x+y+count;

4、这里的难点在于求和后的结果超过10应该怎么办?我们应该将其记录下来,然后添加到下一次求和中,如上式的sum,记录的方式为:sum=sum/10,结果是0或者1;

5、curr节点应该添加一个新的节点,并且存放所求得的和值,方式为curr.next=new ListCode(sum%10);

6、将curr,p1,p2分别向后移动指针, curr=curr.next;    if(p1!=null) p1=p1.next;    if(p2!=null) p2=p2.next;

7、如果在最后一轮循环中count大于1,这需要新创建一个节点  curr.next=new ListNode(count);

8、返回链表DummyNode.next,因为第一个节点为0,无意义。

具体实现过程:

  1. class Solution {
  2. public ListNode addTwoNumbers(ListNode l1, ListNode l2) {
  3.  
  4. ListNode DummyNode=new ListNode(0);
  5. ListNode p1=l1,p2=l2,curr=DummyNode;
  6.  
  7. int count=0;
  8. while(p1!=null||p2!=null)
  9. {
  10. int x=(p1!=null)? p1.val:0;
  11. int y=(p2!=null)? p2.val:0;
  12. int sum=x+y+count;
  13. count=sum/10;
  14.  
  15. curr.next=new ListNode(sum%10);
  16. curr=curr.next;
  17. if(p1!=null) p1=p1.next;
  18. if(p2!=null) p2=p2.next;
  19. }
  20.  
  21. if(count>0)
  22. curr.next=new ListNode(count);
  23.  
  24. return DummyNode.next;
  25. }
  26. }

题目二:

给定一个字符串,请你找出其中不含有重复字符的 最长子串 的长度。

示例 1:

输入: "abcabcbb"
输出: 3
解释: 因为无重复字符的最长子串是 "abc",所以其长度为 3。

方法一:暴力法

1、获得字符串长度,用二次循环直接遍历所有的可能性 for(int i=0; i<s.lenght;i++) for(int j=i+1;j<s.lenght;j++)

2、获取所有字符串长度的最大值,ans=Math.max(ans,j-i)

3、这里最主要的一部是获取字符串长度的比较,首先设置一个集合Set<Character> set=new HashSet<>();

4、将字符串s,i,j的位置传入判断函数,获取传入的值Character ch=s.CharAt(i),获取索引i的值;

5、判断ch值是否重复,if(set.contain(ch)) return false,set.add(ch);

6、返回true;

具体代码:

  1. class Solution {
  2. public int lengthOfLongestSubstring(String s) {
  3.  
  4. int n=s.length();
  5. int ans=0;
  6.  
  7. for(int i=0;i<n;i++)
  8. for(int j=i+1;j<=n;j++)
  9. {
  10. if(JugleFun(s,i,j)) ans=Math.max(ans, j-i);
  11. }
  12.  
  13. return ans;
  14. }
  15.  
  16. public boolean JugleFun(String s,int start,int end)
  17. {
  18. Set<Character> set=new HashSet<>();
  19.  
  20. for(int i=start;i<end;i++)
  21. {
  22. Character ch=s.charAt(i);
  23. if(set.contains(ch)) return false;
  24. set.add(ch);
  25. }
  26.  
  27. return true;
  28. }
  29. }

方法二:滑动窗口

1、使用i=0,j=0两个值向后逐个滑动;

2、主要的思想:如果遍历过字符串为不重复子串,就没必要再去重复判断,如果1234561,i=1,j=1,直接从i=2和j=1进行判断;

3、if(!set.contain(s.charAt(j))),set.add(s.char(j++))  否则set.remove(s.charAt(i++));

具体代码:

  1. class Solution {
  2. public int lengthOfLongestSubstring(String s) {
  3.  
  4. int n=s.length();
  5. int i=0,j=0,ans=0;
  6. Set<Character> set=new HashSet<>();
  7.  
  8. while(i<n&&j<n)
  9. {
  10. if(!set.contains(s.charAt(j)))
  11. {
  12. set.add(s.charAt(j++));
  13. ans=Math.max(ans, j-i);
  14. }
  15. else {
  16. set.remove(s.charAt(i++));
  17. }
  18. }
  19.  
  20. return ans;
  21. }
  22. }

题目三:

给定一个只包括 '(',')','{','}','[',']' 的字符串,判断字符串是否有效。

有效字符串需满足:

左括号必须用相同类型的右括号闭合。
左括号必须以正确的顺序闭合。
注意空字符串可被认为是有效字符串。

示例 1:

输入: "()"
输出: true

分析:

1、字符的两两匹配问题,先将其放入哈希表中,HashMap<Character,Character> hashmap=new HashMap<>();

2、在构造函数中进行初始化,hashmap.put(')','(');

3、应该使用栈数据结构,将放入的元素和栈顶元素对比,Stack<Character> stack=new Stack<>(),获取串元素:k=s.CharAt(i);

4、如果是哈希表中的键,将进行对比,否则直接压栈,if(hashmap.containKey(c)), 获取栈顶元素:Character topElem=stack.empty()? '#':stack.pop();

5、比较栈顶元素和要入栈的元素是否相同,if(topElem!=hashmap.get(c))

6、返回栈是否为空,return stack.empty();

具体代码:

  1. class Solution {
  2.  
  3. private HashMap<Character, Character> hashMap=new HashMap<Character,Character>();
  4.  
  5. public Solution()
  6. {
  7. hashMap.put(')', '(');
  8. hashMap.put('}', '{');
  9. hashMap.put(']', '[');
  10. }
  11.  
  12. public boolean isValid(String s) {
  13.  
  14. Stack<Character> stack=new Stack<>();
  15.  
  16. for(int i=0;i<s.length();i++)
  17. {
  18. char c=s.charAt(i);
  19.  
  20. if(hashMap.containsKey(c))
  21. {
  22. Character topEle=stack.empty()? '#':stack.pop();
  23.  
  24. if(topEle!=hashMap.get(c))
  25. return false;
  26. }
  27.  
  28. else {
  29. stack.push(c);
  30. }
  31. }
  32. return stack.empty();
  33. }
  34. }

题目四:

给定一个链表,删除链表的倒数第 n 个节点,并且返回链表的头结点。

示例:

给定一个链表: 1->2->3->4->5, 和 n = 2.

当删除了倒数第二个节点后,链表变为 1->2->3->5.

方法一:

1、删除倒数第n个节点,先应该遍历出链表的长度,然后用lenght=length-n;

2、判断链表长度定位到删除的位置,if(lenght>0) curr=curr.next;

3、需要设置两个节点,一个用来遍历curr,另一个指向头结点,ListNode dummy=new ListNode;

4、返回dummy.next;

具体代码:

  1. class Solution {
  2. public ListNode removeNthFromEnd(ListNode head, int n) {
  3.  
  4. ListNode curr=head;
  5. ListNode dummy=new ListNode(0);
  6. dummy.next=head;
  7. int count=0;
  8.  
  9. while(curr!=null)
  10. {
  11. count++;
  12. curr=curr.next;
  13. }
  14. count-=n;
  15. curr=dummy;
  16. while(count>0)
  17. {
  18. count--;
  19. curr=curr.next;
  20. }
  21. curr.next=curr.next.next;
  22. return dummy.next;
  23. }
  24. }

方法二:

分析:

1、采用双指针实现,first指针先执行n步,然后second指针开始执行;

2、直到first为空,停止执行second;

3、将second指针指向下一个节点second.next=second.next.next;

4、开始设置哑结点指向头结点,first和second都指向dummy;

具体代码:

  1. class Solution {
  2. public ListNode removeNthFromEnd(ListNode head, int n) {
  3.  
  4. ListNode dummy=new ListNode(0);
  5. dummy.next=head;
  6. ListNode first=dummy;
  7. ListNode second=dummy;
  8.  
  9. for(int i=1;i<=n+1;i++)
  10. {
  11. first=first.next;
  12. }
  13.  
  14. while(first!=null)
  15. {
  16. first=first.next;
  17. second=second.next;
  18. }
  19.  
  20. second.next=second.next.next;
  21.  
  22. return dummy.next;
  23. }
  24. }

题目五:

给定一个字符串 s,找到 s 中最长的回文子串。你可以假设 s 的最大长度为 1000。

示例 1:

输入: "babad"
输出: "bab"
注意: "aba" 也是一个有效答案。

方法一:暴力法

判断字符串中的回文,并将最大的回文串返回

1、将所有的字符串进行遍历,判断每个字符串是否为回文;

2、可以另外设置一个函数进行判断,判断字符串的第一位和最后一位是否相同即可,即if(s.charAt(i)==s.charAt(lenght-i-1))

3、设置返回的字符串为ans=" ";如果字符串为回文,那么返回最大的字符串,ma=0;if(str.lengt>0),ans=str,ma=Math.max(max,str.lenght);

4、返回length;

  1. class Solution {
  2. public String longestPalindrome(String s) {
  3.  
  4. String ans="";
  5. int ma=0;
  6.  
  7. for(int i=0;i<s.length();i++)
  8. for(int j=i+1;j<=s.length();j++)
  9. {
  10. String str=s.substring(i,j);
  11. if(isHuiWei(str)&&str.length()>ma)
  12. {
  13. ans=s.substring(i,j);
  14. ma=Math.max(ma, ans.length());
  15. }
  16. }
  17. return ans;
  18. }
  19.  
  20. public boolean isHuiWei(String s)
  21. {
  22.  
  23. int len=s.length();
  24. for(int i=0;i<len/2;i++)
  25. {
  26. if(s.charAt(i)!=s.charAt(len-i-1))
  27. {
  28. return false;
  29. }
  30. }
  31. return true;
  32. }
  33.  
  34. }

方法二:动态规划

  1. class Solution {
  2. public String longestPalindrome(String s) {
  3.  
  4. int len=s.length();
  5. if(len<=1)
  6. return s;
  7.  
  8. int longpa=1;
  9. String string=s.substring(0,1);
  10. boolean[][] dp=new boolean[len][len];
  11.  
  12. for(int r=1;r<len;r++)
  13. for(int l=0;l<r;l++)
  14. {
  15. if(s.charAt(l)==s.charAt(r)&&(r-l<=2||dp[l+1][r-1]))
  16. {
  17. dp[l][r]=true;
  18. if(r-l+1>longpa)
  19. {
  20. longpa=r-l+1;
  21. string=s.substring(l,r+1);
  22. }
  23. }
  24. }
  25. return string;
  26. }
  27. }

题目六:

一个机器人位于一个 m x n 网格的左上角 (起始点在下图中标记为“Start” )。

机器人每次只能向下或者向右移动一步。机器人试图达到网格的右下角(在下图中标记为“Finish”)。

问总共有多少条不同的路径?

方法一:

1、递归算法,递归出口:if(m==1||n==1) return 1;

2、返回结果:ans=uniquePath(m-1,n)+uniquePath(m,n-1);

具体代码:

  1. class Solution {
  2. public int uniquePaths(int m, int n) {
  3.  
  4. if(m==||n==)
  5. return ;
  6.  
  7. int ans=uniquePaths(m-, n)+uniquePaths(m, n-);
  8.  
  9. return ans;
  10. }
  11. }

方法二:

1、动态规划,状态方程:dp[i][j]=dp[i-1][j]+dp[i][j-1];

2、状态初始化:dp[i][0]=1,dp[0][j]=1;

3、返回最后的结果,return dp[m-1][n-1];

具体代码:

  1. class Solution {
  2. public int uniquePaths(int m, int n) {
  3.  
  4. int[][] dp=new int[m][n];
  5.  
  6. for(int i=;i<=m;i++) dp[i][]=;
  7. for(int i=;i<=n;i++) dp[][i]=;
  8. for(int i=;i<=m;i++)
  9. for(int j=;j<=m;j++)
  10. {
  11. dp[i][j]=dp[i-][j]+dp[i][j-];
  12. }
  13. return dp[m-][n-];
  14. }
  15. }

题目七:

给定一个无重复元素的数组 candidates 和一个目标数 target ,找出 candidates 中所有可以使数字和为 target 的组合。

candidates 中的数字可以无限制重复被选取。

说明:

所有数字(包括 target)都是正整数。
解集不能包含重复的组合。 
示例 1:

输入: candidates = [2,3,6,7], target = 7,
所求解集为:
[
[7],
[2,2,3]
]

方法:

回溯加递归

具体代码:

  1. class Solution {
  2.  
  3. private int[] candidates;
  4. private List<List<Integer>> res=new ArrayList<>();
  5. private int len;
  6.  
  7. public List<List<Integer>> combinationSum(int[] candidates, int target) {
  8.  
  9. int len=candidates.length;
  10. if(len==0)
  11. return res;
  12.  
  13. Arrays.sort(candidates);
  14. this.len=len;
  15. this.candidates=candidates;
  16.  
  17. findCombinationSum(target,0,new Stack<>());
  18. return res;
  19. }
  20.  
  21. public void findCombinationSum(int target,int start,Stack<Integer> stack)
  22. {
  23. if(target==0)
  24. {
  25. res.add(new ArrayList<>(stack));
  26. return;
  27. }
  28.  
  29. for(int i=start;i<len&&(target-candidates[i])>=0;i++)
  30. {
  31. stack.add(candidates[i]);
  32. findCombinationSum(target-candidates[i], i, stack);
  33. stack.pop();
  34. }
  35. }
  36. }

题目八:

给定一个非负整数数组,你最初位于数组的第一个位置。

数组中的每个元素代表你在该位置可以跳跃的最大长度。

判断你是否能够到达最后一个位置。

示例 1:

输入: [2,3,1,1,4]
输出: true
解释: 从位置 0 到 1 跳 1 步, 然后跳 3 步到达最后一个位置。

方法一:

1、递归算法,我们想要实现是否满足路径;

2、创建一个函数实现是个可以从一个位置,从位置0开始,是否能够到达最后一个位置;

3、实现递归,第二个位置是否能够实现到达最后一个位置; 将所有的可能性都列举出来,位置1可能到达的位置;

4、fasterPos=Math.min(positon+nums[position]),进行循环fasterPos次;

具体代码:

  1. class Solution {
  2. public boolean canJump(int[] nums) {
  3.  
  4. return FromCanJump(0, nums);
  5. }
  6.  
  7. public boolean FromCanJump(int position,int[] nums)
  8. {
  9. int len=nums.length-1;
  10. if(position==len)
  11. return true;
  12.  
  13. int FasterDistance=Math.min(position+nums[position], len);
  14. for(int nextPostion=position+1;nextPostion<=FasterDistance;nextPostion++)
  15. {
  16. if(FromCanJump(nextPostion, nums))
  17. return true;
  18. }
  19.  
  20. return false;
  21. }
  22. }

方法二:

将递归出来的元素保存在一个数组中

具体代码:

  1. enum Index
  2. {GOOD,BAD,UNKOWN}
  3.  
  4. class Solution {
  5. Index[] mono;
  6.  
  7. public boolean canJump(int[] nums) {
  8. mono=new Index[nums.length];
  9.  
  10. for(int i=0;i<mono.length;i++)
  11. {
  12. mono[i]=Index.UNKOWN;
  13. }
  14. mono[mono.length-1]=Index.GOOD;
  15.  
  16. return canJumpPosition(0,nums);
  17. }
  18.  
  19. public boolean canJumpPosition(int position, int[] nums)
  20. {
  21. if(mono[position]!=Index.UNKOWN)
  22. {
  23. return mono[position]==Index.GOOD?true:false;
  24. }
  25.  
  26. int furthestJump = Math.min(position + nums[position], nums.length - 1);
  27. for (int nextPosition = position + 1; nextPosition <= furthestJump; nextPosition++) {
  28. if (canJumpPosition(nextPosition, nums)) {
  29. mono[position] = Index.GOOD;
  30. return true;
  31. }
  32. }
  33.  
  34. mono[position] = Index.BAD;
  35. return false;
  36. }
  37. }

题目九:

给定一个二叉树,返回其按层次遍历的节点值。 (即逐层地,从左到右访问所有节点)。

例如:
给定二叉树: [3,9,20,null,null,15,7],

3
/ \
9 20
/ \
15 7

方法一:

1、递归,二叉树层次遍历用递归可以实现;

2、不过需要做一些简单的设置,并不能原函数上进行递归,原函数只给定了根节点;

3、还需要另外一个参数,层level,对这个函数进行递归;

4、if(levels.size()==level) 增加一个数组,levels.add(new Arraylist());

5、添加元素到数组中,levels.get(level).add(node.val);

具体代码:

  1. class Solution {
  2.  
  3. List<List<Integer>> levels=new ArrayList<>();
  4.  
  5. public List<List<Integer>> levelOrder(TreeNode root) {
  6.  
  7. if(root==null) return levels;
  8. Creatlevel(root, 0);
  9.  
  10. return levels;
  11. }
  12.  
  13. public List<List<Integer>> Creatlevel(TreeNode node,int level)
  14. {
  15. if(levels.size()==level)
  16. levels.add(new ArrayList<>());
  17.  
  18. levels.get(level).add(node.val);
  19.  
  20. if(node.left!=null)
  21. Creatlevel(node.left, level+1);
  22. if(node.right!=null)
  23. Creatlevel(node.right, level+1);
  24.  
  25. return levels;
  26. }
  27. }

方法二:

队列

具体代码:

  1. class Solution {
  2.  
  3. public List<List<Integer>> levelOrder(TreeNode root) {
  4.  
  5. List<List<Integer>> levels=new ArrayList<>();
  6. if(root==null) return levels;
  7.  
  8. Queue<TreeNode> queue=new LinkedList<TreeNode>();
  9. queue.add(root);
  10.  
  11. int level=0;
  12. while(!queue.isEmpty())
  13. {
  14. levels.add(new ArrayList<>());
  15. int level_size=levels.size();
  16.  
  17. for(int i=0;i<level_size;i++)
  18. {
  19. TreeNode node=queue.remove();
  20. levels.get(level).add(node.val);
  21.  
  22. if (node.left != null) queue.add(node.left);
  23. if (node.right != null) queue.add(node.right);
  24.  
  25. }
  26. level++;
  27. }
  28. }
  29. }

题目十:

给定一个链表,旋转链表,将链表每个节点向右移动 k 个位置,其中 k 是非负数。

示例 1:

输入: 1->2->3->4->5->NULL, k = 2
输出: 4->5->1->2->3->NULL
解释:
向右旋转 1 步: 5->1->2->3->4->NULL
向右旋转 2 步: 4->5->1->2->3->NULL

方法:

1、链表的移动,遍历整个链表,先找到尾节点的值,并把尾结点指向head使得链表构成一个环;

2、for(int n=1;old_tail!=null;n++) old_tail=old_tail.next,这里需要记录一下整个链表的长度;

3、定义一个新的尾结点new_tail,for(int i=0;i<n-k%n-1;i++) new_tail=new_tail.next,这里的循环条件满足k>n;

4、定义一个新的头节点new_head=new_tail.next;new_tail.next=null;

5、返回new_head;

具体代码:

  1. class Solution {
  2. public ListNode rotateRight(ListNode head, int k) {
  3.  
  4. if(head==null) return null;
  5. if(head.next==null) return head;
  6.  
  7. ListNode old_tail=head;
  8. int n;
  9. for(n=1;old_tail.next!=null;n++)
  10. {
  11. old_tail=old_tail.next;
  12. }
  13. old_tail.next=head;
  14.  
  15. ListNode new_tail=head;
  16. for(int i=0;i<n-k%n-1;i++)
  17. {
  18. new_tail=new_tail.next;
  19. }
  20.  
  21. ListNode new_head=new_tail.next;
  22. new_tail.next=null;
  23.  
  24. return new_head;
  25. }
  26. }

LeetCode中等题(一)的更多相关文章

  1. leetcode 中等题(2)

    50. Pow(x, n) (中等) double myPow(double x, int n) { ; unsigned long long p; ) { p = -n; x = / x; } el ...

  2. leetcode 中等题(1)

    2. Add Two Numbers(中等) /** * Definition for singly-linked list. * struct ListNode { * int val; * Lis ...

  3. LeetCode中等题(三)

    题目一: 反转从位置 m 到 n 的链表.请使用一趟扫描完成反转. 说明:1 ≤ m ≤ n ≤ 链表长度. 示例: 输入: 1->2->3->4->5->NULL, m ...

  4. leetcode中等题

    # Title Solution Acceptance Difficulty Frequency     1 Two Sum       44.5% Easy     2 Add Two Number ...

  5. LeetCode中等题(二)

    题目一: 给定一个包含 n 个整数的数组 nums,判断 nums 中是否存在三个元素 a,b,c ,使得 a + b + c = 0 ?找出所有满足条件且不重复的三元组. 注意:答案中不可以包含重复 ...

  6. 这样leetcode简单题都更完了

    这样leetcode简单题都更完了,作为水题王的我开始要更新leetcode中等题和难题了,有些挖了很久的坑也将在在这个阶段一一揭晓,接下来的算法性更强,我就要开始分专题更新题目,而不是再以我的A题顺 ...

  7. LeetCode刷题笔记和想法(C++)

    主要用于记录在LeetCode刷题的过程中学习到的一些思想和自己的想法,希望通过leetcode提升自己的编程素养 :p 高效leetcode刷题小诀窍(这只是目前对我自己而言的小方法,之后会根据自己 ...

  8. leetcode刷题指南

    转载自:http://blog.csdn.net/lnho2015/article/details/50962989 以下是我个人做题过程中的一些体会: 1. LeetCode的题库越来越大,截止到目 ...

  9. LeetCode刷题总结-数组篇(上)

    数组是算法中最常用的一种数据结构,也是面试中最常考的考点.在LeetCode题库中,标记为数组类型的习题到目前为止,已累计到了202题.然而,这202道习题并不是每道题只标记为数组一个考点,大部分习题 ...

随机推荐

  1. Kafka .net 开发入门

    Kafka安装 首先我们需要在windows服务器上安装kafka以及zookeeper,有关zookeeper的介绍将会在后续进行讲解. 在网上可以找到相应的安装方式,我采用的是腾讯云服务器,借鉴的 ...

  2. Bugku-CTF社工篇之简单的个人信息收集

  3. CentOS 7控制台屏幕分辨率问题

    我们在服务器上,很少会安装图形化界面,一般都使用字符界面的控制台.CentOS 下,控制台分辨率缺省情况下,变得很高,导致在显示器上花屏或者只能显示局部. 这是由于使用了frame buffer,好处 ...

  4. day04-MyBatis的缓存与懒加载

    为什么会用到缓存? 为了减少与数据库链接所消耗的时间,将查询到的内容放到内存中去,下次查询直接取用就ok了. 缓存的适应场景: 1.经常查询并且不经常改变的. 2.数据的正确与否对最终结果影响不大的. ...

  5. Java的进制转换

    十进制转其它进制 其它进制转十进制 A进制转B进制可以将十进制作为中间媒介 Integer.toString(int i, int radix) 返回用第二个参数指定基数表示的第一个参数的字符串表示形 ...

  6. 《JavaScript高级程序设计》读书笔记(一)JavaScript简介

    起于客户端数据验证特性----闭包----匿名函数----元编程等----等想要全面理解和掌握JavaScript----本质----历史----局限性 ECMAScript 脚本语言标准 JavaS ...

  7. Windows 安装python虚拟环境

    windows 安装pytho虚拟环境 方法一:virtualenv (1)使用pip安装virtualenv工具 pip install virtualenv (2)使用virtualenv创建虚拟 ...

  8. Java自学-集合框架 ArrayList和LinkedList的区别

    ArrayList和LinkedList的区别 步骤 1 : ArrayList和LinkedList的区别 ArrayList ,插入,删除数据慢 LinkedList, 插入,删除数据快 Arra ...

  9. 2019年ipa发布苹果应用商店审核指南

    https://baijiahao.baidu.com/s?id=1623886553597961077&wfr=spider&for=pc ipa 发布审核指南 说明: 本指南为初版 ...

  10. 登陆页面Sql注入(绕过)

    如图,看到这道题的时候发觉之前做过一个类似的手工注入: 不过这次手注会失败,后台过滤了sql语句里的一些东西,但我们并不知道过滤了什么 到这里我就基本上没辙了,不过查询了资料以后发现sqlmap可以对 ...