- 博客(14)
- 资源 (3)
- 问答 (3)
- 收藏
- 关注
原创 Mumbling
好久没写C语言了,太费劲了,哈哈哈哈 char *accum(const char *source) { if (*source=='\0') { return ""; } int size=0; const char *temp=source; //获得字符串大小 while(*temp++) { size++; } //分配内存 char *str=(ch...
2019-04-19 21:49:32 293
原创 Self Dividing Numbers
class Solution { public: bool DividingNumbers(int i) { int temp = i; if (i / 10 == 0 && i!=10) { return true; } else { int c; while (temp != 0) { c = temp % 10; if (...
2019-04-19 09:53:45 125
原创 DI String Match
class Solution { public: vector<int> diStringMatch(string S) { size_t size=S.length(); vector<int > A; //使用贪心策略 int d=size,in=0; ...
2019-04-18 09:15:12 132
转载 Hamming Distance
class Solution { public: int hammingDistance(int x, int y) { //首先进行异或操作,转成二进制,就是结果中1的个数,为汉明距离 int tmpInt=x^y; int dis=0; //判断是否为0 while(tmpInt) { //如果先右移再...
2019-04-17 12:47:41 135
原创 Sort Array By Parity
class Solution { public: vector<int> sortArrayByParity(vector<int>& A) { size_t size=A.size(); int i=0,j=size-1; int temp=0; while(i<j)...
2019-04-15 21:42:56 186
原创 N-Repeated Element in Size 2N Array
class Solution { public: int repeatedNTimes(vector<int>& A) { size_t size=A.size(); int i=0; int count=0; while (i<size) { if(i+1<size ...
2019-04-15 10:15:37 138
原创 唯一摩尔斯密码词
class Solution { public: int uniqueMorseRepresentations(vector<string>& words) { string label[26] = { ".-","-...","-.-.","-..",".", "..-.","--.","....","..",".---", "-.-","...
2019-04-12 18:22:00 148
原创 Remove Outermost Parentheses
class Solution { public: string removeOuterParentheses(string S) { string str = ""; //(()())(()) size_t size = S.length(); int i = 0; int tag = 0; int count = 0; while (i < size) ...
2019-04-12 10:57:08 232
原创 Valid Number
class Solution { public: bool isNumber2(string s, int i,size_t size,int tag) { if (s[i] <= '9' && s[i] >= '0') { while (i < size && s[i] <= '9' && s[i] &g...
2019-04-11 19:37:08 116
原创 翻转镜像
class Solution { public: vector<vector<int>> flipAndInvertImage(vector<vector<int>>& A) { size_t m = A.size(); size_t n = A[0].size(); int half = n / 2, temp = 0; ...
2019-04-10 19:20:53 2495
原创 宝石个数
class Solution { public: int numJewelsInStones(string J, string S) { //统计宝石个数 int count = 0; //获得字符串长度 int j_length = J.length(); int s_length = S.length(); int s = 0; while (s<...
2019-04-10 12:51:58 190
原创 有序数组的平方
仅仅记录下,自己写的过程,不是最好,仅供参考,哈哈哈 class Solution { public: vector<int> sortedSquares(vector<int>& A) { vector<int> B; vector<int> C; vector<int> D; size...
2019-04-10 00:01:28 146 1
原创 python 视频转图片保存(图形化界面)
import cv2 import sys import os import numpy as np from tkinter import * from tkinter.filedialog import * from tkinter import filedialog import threading class WidgetsDemo: def __init__(self): ...
2019-04-05 11:15:01 819 1
原创 python xml转voc格式(图形化操作)
#coding=utf-8 from tkinter import * from tkinter.filedialog import askdirectory from tkinter import * import os,shutil import xml.etree.ElementTree as ET import pickle import os import threading ...
2019-04-05 09:13:58 578
Reinforcement Learning An Introduction~Summary of Notation
2018-11-15
mips指令cpu流水线vsd图
2017-12-19
数据结构课程设计
2017-01-22
go语言中list怎么作为函数中的参数传递呢
2017-10-24
怎么解决java网络通信编程ip和port是从文本框中获取的?
2016-09-27
汇编语言安装软件时出现问题了,求大神解决啊
2015-11-11
TA创建的收藏夹 TA关注的收藏夹
TA关注的人