ICode9

精准搜索请尝试: 精确搜索
  • 1072 开学寄语 较简单2022-07-12 12:04:33

    代码 #include <iostream> #include <cstdio> #include <set> #include <string> using namespace std; int main() { int n,m; string index; string name; set<string> st; int k; string sindex; int cnt=0; int cnt2=0; int f; cin

  • 455. 分发饼干2021-09-29 12:34:55

    要求:孩子食量数组,饼干数组,每个孩子只能吃一个,要求最大能满足多少个孩子 思路:先排序,复杂度O不写了 class Solution { public: int findContentChildren(vector<int>& g, vector<int>& s) { int gn=g.size(),sn=s.size(); int sindex=0,gindex=0,num=0;

  • LeetCode-010-正则表达式匹配2021-06-15 21:32:55

    正则表达式匹配 题目描述:给你一个字符串 s 和一个字符规律 p,请你来实现一个支持 '.' 和 '*' 的正则表达式匹配。 '.' 匹配任意单个字符 '*' 匹配零个或多个前面的那一个元素 所谓匹配,是要涵盖 整个 字符串 s的,而不是部分字符串。 示例说明请见LeetCode官网。 来源:力扣(LeetCode) 链

  • C#BF算法递归实现2021-04-01 23:35:27

    BruteForce算法递归实现,少了点慧根 using System; namespace BruteForce { class Program { static void Main(string[] args) { bool run = true; while (run) { Console.WriteLine("BruteForce

  • 剑指offer--正则表达式匹配问题Java解法2021-04-01 23:01:29

    之前做虾皮的笔试题时好像有个正则匹配的题目,当时没ac,后面有事情也没想起来要找答案,今天特来还债。 解析:题目中有个关键字符※(打不出来星号,就用这个代替吧),判断两个字符串是否匹配※位置至关重要。其实也是一种边界问题,有好多种情况需要考虑,考虑用递归来解这个问题。 根据

  • 【剑指Offer学习】【面试题12 :打印1 到最大的n 位数】2020-02-21 12:43:01

    https://blog.csdn.net/sinat_36161667/article/details/80786754   bool increment(char * array, int n) { int sIndex = n-1; array[sIndex] = array[sIndex] + 1; int extra = 0; for (int i = sIndex; i>=0; i--) { int curIndexNum = array

  • 字符串匹配2019-08-16 09:35:32

    44. Wildcard Matching Hard 120177FavoriteShare Given an input string (s) and a pattern (p), implement wildcard pattern matching with support for '?' and '*'. '?' Matches any single character. '*' Matches any sequen

  • 【力扣LeetCode】10 正则表达式匹配2019-06-03 18:51:14

    题目描述(难度难) 给你一个字符串 s 和一个字符规律 p,请你来实现一个支持 '.' 和 '*' 的正则表达式匹配。 '.' 匹配任意单个字符 '*' 匹配零个或多个前面的那一个元素 所谓匹配,是要涵盖 整个 字符串 s的,而不是部分字符串。 说明: s 可能为空,且只包含从 a-z 的小写字母。 p 可

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有