GithubHelp home page GithubHelp logo

csjsss.github.io's People

Contributors

csjsss avatar dependabot[bot] avatar

Watchers

 avatar

csjsss.github.io's Issues

[cpp]便捷的字符串分割方法 - Jsss's Blog

https://csjsss.github.io/2021/10/27/%5Bcpp%5D%E4%BE%BF%E6%8D%B7%E7%9A%84%E5%AD%97%E7%AC%A6%E4%B8%B2%E5%88%86%E5%89%B2%E6%96%B9%E6%B3%95/

前言不像python的str提供的内置split方法一样方便的进行字符串分割,c++的string模板库没有直接提供分割字符串的成员方法。偶然在看《c++prime》时看到string模板库提供getline方法, 利用方法可以实现自定义分隔符分割字符串。 使用getline进行分割getline函数接受三个参数,分别是input(the stream to get data from), str

[LeetCode-869]重新排序得到2的幂 - Jsss's Blog

https://csjsss.github.io/2021/10/28/%5BLeetCode-869%5D%E9%87%8D%E6%96%B0%E6%8E%92%E5%BA%8F%E5%BE%97%E5%88%B02%E7%9A%84%E5%B9%82/

原题链接 题目描述判断一个数字重新排列后能否成为2的某个幂次. 思路 模拟: 考虑到数据范围很小, 我们可以暴力枚举该数的所有排列, 然后判断该数是否为2的幂次. 模拟: 考虑到2的幂次的个数很少, 我们可以首先预处理出来所有的2的幂次, 然后判断该数是否为某个2的幂次。由于数字可以重新排列, 因此只需记录词频, 即若两个数词频相同, 则一个数一个可以通过重新排列变成两外一个数. Code123

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.