Given two strings s1 and s2, write a function to return true if s2 contains the permutation of s1. In other words, one of the first string's permutations is the substring of the second string.

Example 1:

Input:s1 = "ab" s2 = "eidbaooo"
Output:True
Explanation: s2 contains one permutation of s1 ("ba").

Example 2:

Input:s1= "ab" s2 = "eidboaoo"
Output: False

Note:

  1. The input strings only contain lower case letters.
  2. The length of both given strings is in range [1, 10,000].

LeetCode567. Permutation in String的更多相关文章

  1. 567. Permutation in String

    Problem statement: Given two strings s1 and s2, write a function to return true if s2 contains the p ...

  2. [Swift]LeetCode567. 字符串的排列 | Permutation in String

    Given two strings s1 and s2, write a function to return true if s2 contains the permutation of s1. I ...

  3. [LeetCode] Permutation in String 字符串中的全排列

    Given two strings s1 and s2, write a function to return true if s2 contains the permutation of s1. I ...

  4. 567. Permutation in String判断某字符串中是否存在另一个字符串的Permutation

    [抄题]: Given two strings s1 and s2, write a function to return true if s2 contains the permutation of ...

  5. 60. Permutation Sequence (String; Math)

    The set [1,2,3,…,n] contains a total of n! unique permutations. By listing and labeling all of the p ...

  6. LeetCode Permutation in String

    原题链接在这里:https://leetcode.com/problems/permutation-in-string/description/ 题目: Given two strings s1 an ...

  7. [LeetCode] 567. Permutation in String 字符串中的全排列

    Given two strings s1 and s2, write a function to return true if s2 contains the permutation of s1. I ...

  8. 567. Permutation in String【滑动窗口】

    Given two strings s1 and s2, write a function to return true if s2 contains the permutation of s1. I ...

  9. 【LeetCode】567. Permutation in String 解题报告(Python)

    作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 题目地址:https://leetcode.com/problems/permutati ...

随机推荐

  1. (转) HTTP & HTTPS网络协议重点总结(基于SSL/TLS的握手、TCP/IP协议基础、加密学)

    HTTP & HTTPS网络协议重点总结(基于SSL/TLS的握手.TCP/IP协议基础.加密学) 原文:http://blog.csdn.net/itermeng/article/detai ...

  2. 封装RateLimiter 令牌桶算法

    自定义注解封装RateLimiter.实例: @RequestMapping("/myOrder") @ExtRateLimiter(value = 10.0, timeOut = ...

  3. 转-Shell笔记——命令:Sort,uniq,join,cut,paste,split

    转自:http://blog.csdn.net/wklken/article/details/6562098 Sort,uniq,join,cut,paste,split 命令—— Sort Sort ...

  4. 亲测SQLServer的最大连接数

    很多做架构设计.程序开发.运维.技术管理的朋友可能或多或少有这样的困惑: SQLServer到底支持多少连接数的并发? SQLServer是否可以满足现有的应用吗? 现有的技术架构支持多少连接数的并发 ...

  5. C#数字图像处理算法学习笔记(二)--点运算与直方图

    C#数字图像处理算法学习笔记(二)--点运算与直方图 在数字图像处理中,点运算是一种简单而重要的技术.点运算只是根据对象的像素的输入灰度值来决定像素的输出灰度值的图像处理运算.它有时也被称为对比度增强 ...

  6. 修改默认 JVM 参数 securerandom.source

    最近在云服务器上部署tomcat的时候,执行 startup.sh老是卡住了. 开始以为是日志配的不对,因为在对象中引入的是slf4,不是apache的log4j,后面把所有引入的地方都修改为Apac ...

  7. 设置 text-align: center;line-height:height 居中无效

    1.设置文字水平居中 内联元素(行内元素)使用: text-align: center: 使用后文字仍然没有居中 解决方法:设置width:100%: 块元素使用: margin: 0 auto; 2 ...

  8. ActionMethod_DMI_动态方法调用

    Action执行的时候并不一定要执行execute方法可以在配置文件中配置Action的时候用method=来指定执行那个方法,也可以在url地址中动态指定(动态方法调用DMI)(推荐) 动态方法调用 ...

  9. JavaScript 面向对象编程(三):非构造函数对象的继承

    JavaScript 面向对象编程(三):非构造函数对象的继承 一.什么是"非构造函数"的继承? 比如,现在有一个对象,叫做"中国人". var Chinese ...

  10. 吴超hadoop7天视频教程全集

    吴超hadoop7天视频教程全集 一.初级班全套视频 1.linux使用(3节) 2.伪分布模式安装hadoop(2节) 3.HDFS的体系结构和操作(2节) 4.HDFS的java操作方式(4节) ...