logo
publist
写文章

简介

该用户还未填写简介

擅长的技术栈

可提供的服务

暂无可提供的服务

【leetcode】20. Valid Parentheses

一、题目描述Given a string containing just the characters '(', ')', '{', '}', '[' and ']',determine if the input string is valid.The brackets must close in the correct order, "()" and "()[]{}" 

#leetcode
【leetcode】26. Remove Duplicates from Sorted Array

一、题目描述Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this i

#leetcode
c++实现装饰器模式

一、定义装饰器模式(DecoratorPattern)允许向一个现有的对象添加新的功能,同时又不改变其结构。 使用情况:如果需要添加新功能,但又不想修改定义好的接口或者抽象类,此时适合用装饰模式。 应用场景举例:例如对于一个蛋糕Cake类,一开始是一个原始蛋糕模型,后面需要给蛋糕加工—加上奶油,加上巧克力,加上瓜子仁,加上水果,写上字等。等同于将原始蛋糕作为一个Cake类,我们

#c++
排序算法总结

一、插入排序原理:从第二个元素开始和之前的元素一个一个进行比较,如果比前面的元素小就与之交换,大于等于则继续下一个数的循环。稳定性:稳定时间代价:o(n*n)最好—正序—时间代价o(n)最差—倒序—时间代价o(n*n)平均—乱序—时间代价o(n*n)辅助存储空间:o(1)总结:插入排序的时间复杂度最好的情况是已经是正序的序列,只需比较(n-1)次,时间复杂度为o(n

文章图片
#c++#python
python初步实现word2vec

一、前言一开始看到word2vec环境的安装还挺复杂的,安了半天Cygwin也没太搞懂。后来突然发现,我为什么要去安c语言版本的呢,我应该去用python版本的,然后就发现了gensim,安装个gensim的包就可以用word2vec了,不过gensim只实现了word2vec里面的skip-gram模型。若要用到其他模型,就需要去研究其他语言的word2vec了。 二、语料准备有

#机器学习#python
【leetcode】c++ map按照value排序

目的:map[key, value],按照value排序一、加头文件 #include二、加入代码typedef pair PAIR;int cmp(const PAIR& x, const PAIR& y){return x.second > y.second;}vector pair_vec;for(map::iterator map_iter =

#c++
windows中Django安装教程

一、下载python下载地址:https://www.python.org/downloads/Django下载地址:https://www.djangoproject.com/download/二、安装默认已经安装了Python,这里就只将django的安装(1)下载django压缩包后,解压并且将文件夹放入python的安装目录中,然后进入d

#django#python
windows下使用虚拟机搭建linux环境

一、前期工作:需要下载的软件直接在百度软件中心下一个VMware即可VMware下载地址:http://rj.baidu.com/soft/detail/13808.html?ald&qq-pf-to=pcqq.c2clinux系统下载地址:https://www.ubuntu.com/download/desktop 二、安装教程参考:http://jingyan.b

#linux
c++进制转化及输出精度问题总结

一、十进制转二进制//十进制转二进制stringten_to_two(const unsigned int val){string res="";for(int i=16;i>-0;i--){if(val & (1<<i))res += "1";elseres += "0";

#c++
【leetcode】c++ map按照value排序

目的:map[key, value],按照value排序一、加头文件 #include二、加入代码typedef pair PAIR;int cmp(const PAIR& x, const PAIR& y){return x.second > y.second;}vector pair_vec;for(map::iterator map_iter =

#c++
    共 22 条
  • 1
  • 2
  • 3
  • 请选择