博客专栏  >  编程语言   >  LeetCode专栏

LeetCode专栏

针对LeetCode上的题目给出详细思路解释以及AC代码示例

关注
0 已关注
81篇博文
  • N皇后问题

    N皇后问题-I 问题描述 n皇后问题是将n个皇后放置在n*n的棋盘上,皇后彼此之间不能相互攻击。 给定一个整数n,返回所有不同的n皇后问题的解决方案。 每个解决方案包含一个明确的...

    2018-05-04 00:49
    13
  • 二叉树之理解记忆并背诵,了解一下?

    内容主要包含: 1. 二叉树中DFS三种搜索的模板程序 (递归+非递归) 2. 二叉树BFS非递归版本 3. 二叉树常见到必背的考题 不管你是刷题学习,还是准备面试,二叉树下...

    2018-04-09 22:36
    22
  • LeetCode 108. Convert Sorted Array to Binary Search Tree

    108. Convert Sorted Array to Binary Search Tree一、问题描述 Given an array where elements are sorted in ...

    2017-07-11 17:44
    351
  • LeetCode 111. Minimum Depth of Binary Tree

    111. Minimum Depth of Binary Tree一、问题描述 Given a binary tree, find its minimum depth. The mini...

    2017-07-11 17:44
    357
  • LeetCode 104. Maximum Depth of Binary Tree

    104. Maximum Depth of Binary Tree一、问题描述 Given a binary tree, find its maximum depth. The maxi...

    2017-07-10 13:57
    413
  • LeetCode 107. Binary Tree Level Order Traversal II

    107. Binary Tree Level Order Traversal II一、问题描述 Given a binary tree, return the bottom-up level or...

    2017-07-10 13:57
    446
  • LeetCode 101. Symmetric Tree

    101. Symmetric Tree一、问题描述 Given a binary tree, check whether it is a mirror of itself (ie, symmetr...

    2017-07-10 13:17
    397
  • LeetCode 10. Same Tree

    10. Same Tree一、问题描述 Given two binary trees, write a function to check if they are equal or not. ...

    2017-07-10 13:17
    309
  • LeetCode 69. Sqrt(x)

    69. Sqrt(x)一、问题描述 Implement int sqrt(int x). Compute and return the square root of x. 二、输入输出三...

    2017-07-06 20:35
    490
  • LeetCode 67. Add Binary

    67. Add Binary一、问题描述 Given two binary strings, return their sum (also a binary string). 二、输入输出For ...

    2017-07-06 19:54
    550
  • LeetCode 58. Length of Last Word

    58. Length of Last Word一、问题描述 Given a string s consists of upper/lower-case alphabets and empty sp...

    2017-07-05 19:13
    527
  • LeetCode 28. Implement strStr()

    28. Implement strStr()一、问题描述 Implement strStr(). Returns the index of the first occurrence of...

    2017-07-05 17:37
    522
  • LeetCode 20. Valid Parentheses

    20. Valid Parentheses一、问题描述 Given a string containing just the characters '(', ')', '{', '}', '[' ...

    2017-07-05 16:03
    404
  • LeetCode 14. Longest Common Prefix

    14. Longest Common Prefix一、问题描述 Write a function to find the longest common prefix string amongst ...

    2017-07-05 16:03
    431
  • LeetCode 9. Palindrome Number

    9. Palindrome Number一、问题描述 Determine whether an integer is a palindrome. Do this without extra spa...

    2017-07-04 16:34
    273
  • LeetCode 7. Reverse Integer

    7. Reverse Integer一、问题描述 Reverse digits of an integer. **Have you thought about this?**Here a...

    2017-07-04 15:52
    282
  • LeetCode 4. Median of Two Arrays

    4. Median of Two Arrays一、问题描述 There are two sorted arrays nums1 and nums2 of size m and n respecti...

    2017-07-04 00:42
    465
  • LeetCode 3. Longest Substring Without Repeating Characters

    3. Longest Substring Without Repeating Characters一、问题描述 Given a string, find the length of the lon...

    2017-07-03 17:30
    351
  • LeetCode 617. Merge Two Binary Trees

    617. Merge Two Binary Trees一、问题描述 Given two binary trees and imagine that when you put one of them...

    2017-06-26 15:21
    455
  • LeetCode 500. Keyboard Row

    500. Keyboard Row一、问题描述 Given a List of words, return the words that can be typed using letters of...

    2017-06-26 14:59
    391

机器学习
174432
img博客搬家
img撰写博客
img发布 Chat
img专家申请
img意见反馈
img返回顶部