Shawn_Redemption
码龄17年
关注
提问 私信
  • 博客:62,018
    62,018
    总访问量
  • 136
    原创
  • 2,143,782
    排名
  • 7
    粉丝
  • 0
    铁粉
IP属地以运营商信息为准,境内显示到省(区、市),境外显示到国家(地区)
IP 属地:美国
  • 加入CSDN时间: 2008-06-01
博客简介:

Shawn's Redemption

查看详细资料
个人成就
  • 获得0次点赞
  • 内容获得7次评论
  • 获得2次收藏
创作历程
  • 139篇
    2014年
成就勋章
TA的专栏
  • leetcode
    112篇
  • leetcode之array
    21篇
  • leetcode之string
    6篇
  • leetcode之linked list
    16篇
  • leetcode之tree
    23篇
  • leetcode之binSearch&Sort
    11篇
  • leetcode之math
    7篇
  • leetcode之dynamic programming
    17篇
  • leetcode之backtracking
    11篇
  • leetcode之other
    1篇
  • leetcode难题汇总
    4篇
  • 数据结构
    10篇
  • 基础算法
    14篇
  • 软件工程
    1篇
创作活动更多

如何做好一份技术文档?

无论你是技术大神还是初涉此领域的新手,都欢迎分享你的宝贵经验、独到见解与创新方法,为技术传播之路点亮明灯!

342人参与 去创作
  • 最近
  • 文章
  • 代码仓
  • 资源
  • 问答
  • 帖子
  • 视频
  • 课程
  • 关注/订阅/互动
  • 收藏
搜TA的内容
搜索 取消

【数据结构】栈的两个典型应用

求1位数的四则运算,用括号来控制优先级比如如果是(1+2)* 3 / 4
原创
发布博客 2014.11.06 ·
524 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【数据结构】队列的典型应用

在日常生活和计算中,队列的应用也特别的广泛。比如分解质因数问题
原创
发布博客 2014.11.06 ·
4193 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【Leetcode】Word Ladder II (Backtracking)

Given two words (start and end), and a dictionary, find all shortest transformation sequence(s) from start to end, such that:Only one letter can be changed at a timeEach intermediate word must exi
原创
发布博客 2014.11.14 ·
571 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【Leetcode】Permutation Sequence

The set [1,2,3,…,n] contains a total of n! unique permutations.By listing and labeling all of the permutations in order,We get the following sequence (ie, for n = 3):"123""132""213""231""3
原创
发布博客 2014.11.13 ·
427 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【Leetcode】Longest Consecutive Sequence

Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given [100, 4, 200, 1, 3, 2],The longest consecutive elements sequence is [1, 2, 3
原创
发布博客 2014.11.13 ·
412 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【Leetcode】Word Break (DP)

Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.For example, givens = "leetcode",dict = ["leet"
原创
发布博客 2014.11.13 ·
338 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【Leetcode】Decode Ways (DP)

A message containing letters from A-Z is being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded message containing digits, determine the total numb
原创
发布博客 2014.11.12 ·
549 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【Leetcode】Binary Tree Inorder Traversal (Tree Traversal)(转自Code_Ganker)

通常,实现二叉树的遍历有两个常用的方法:一是用递归,二是使用栈实现的迭代方法。下面分别介绍。递归应该最常用的算法,相信大家都了解,算法的时间复杂度是O(n), 而空间复杂度则是递归栈的大小,即O(logn)。代码如下: [java] view plaincopypublic ArrayList inorderTraversal(Tre
转载
发布博客 2014.11.11 ·
463 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【Leetcode】Binary Tree Postorder Traversal (Tree Traversal)(转自Code_Ganker)

跟Binary Tree Inorder Traversal以及Binary Tree Preorder Traversal一样,二叉树的后序遍历我们还是介绍三种方法,第一种是递归,第二种是迭代方法,第三种是用线索二叉树。 递归还是那么简单,算法的时间复杂度是O(n), 而空间复杂度则是递归栈的大小,即O(logn)。代码如下:[java] view plaincopy
转载
发布博客 2014.11.11 ·
449 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【Leetcode】Binary Tree Preorder Traversal (Tree Traversal) (转自Code_Ganker)

跟Binary Tree Inorder Traversal一样,二叉树的先序遍历我们仍然介绍三种方法,第一种是递归,第二种是迭代方法,第三种是用线索二叉树。递归是最简单的方法,算法的时间复杂度是O(n), 而空间复杂度则是递归栈的大小,即O(logn)。代码如下:[java] view plaincopypublic ArrayList p
转载
发布博客 2014.11.11 ·
433 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【Leetcode】ZigZag Conversion

public String convert(String s, int nRows) { if (s == null || s.length() == 0 || nRows <= 0) return ""; if (nRows == 1) return s; StringBuilder res = new StringBuilder(); int size = 2 *
原创
发布博客 2014.11.11 ·
365 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【Leetcode】Triangle (DP)

Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the following triangle[ [2], [3,4], [
原创
发布博客 2014.11.11 ·
394 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【Leetcode】Valid Palindrome

Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Panama" is a palindrome."race a car" is not a
原创
发布博客 2014.11.11 ·
337 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【Leetcode】Longest Common Prefix

Write a function to find the longest common prefix string amongst an array of strings.这道题典型cai'yon
原创
发布博客 2014.11.10 ·
388 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【Leetcode】Min Stack

Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top() -- Get
原创
发布博客 2014.11.10 ·
366 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【Leetcode】Add Binary

Given two binary strings, return their sum (also a binary string).For example,a = "11"b = "1"Return "100".这是一道二进制加法题,注意进位和
原创
发布博客 2014.11.10 ·
312 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【Leetcode】Count and Say

The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1 is read off as "one 1" or 11.11 is read off as "two 1s" or 21.21 is read off as 
原创
发布博客 2014.11.10 ·
1036 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【Leetcode】Jump Game II (DP)

Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.Your goal i
原创
发布博客 2014.11.10 ·
334 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【Leetcode】Jump Game (DP)

Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.Determine i
原创
发布博客 2014.11.10 ·
376 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【Leetcode】Next Permutation

public void nextPermutation(int[] num) { if(num==null||num.length==0) return; int i=num.length-2; while(i>=0&&num[i]>=num[i+1]) i--; if(i>=0) {
原创
发布博客 2014.11.10 ·
301 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏
加载更多