• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
zihao,wang
博客园 | 首页 | 新随笔 | 新文章 | 联系 | 订阅 订阅 | 管理

2019年7月8日

想要变强大
摘要: 想要变强大,沉潜,厚积薄发 阅读全文
posted @ 2019-07-08 19:02 zihao,wang 阅读(75) 评论(0) 推荐(0)
 
 

2019年4月3日

c++输出小数
摘要: #include <stdio.h> printf("%.4lf",value); #include <iomanip> cout.setf(ios::showpoint); cout<<fixed<<setprecision(4)<<s<<endl; 阅读全文
posted @ 2019-04-03 20:54 zihao,wang 阅读(645) 评论(0) 推荐(0)
 
 

2019年3月15日

camelcase-hankerrank
摘要: int camelcase(string s) { int cnt=0; int a; for(int i=0;i<s.size();i++) { a=s[i]; if(65<=a&&a<=90) { cnt++; } } cnt++; return cnt; } int camelcase(str 阅读全文
posted @ 2019-03-15 22:16 zihao,wang 阅读(114) 评论(0) 推荐(0)
 
superReducedString-hankerrank
摘要: Steve has a string of lowercase characters in range ascii[‘a’..’z’]. He wants to reduce the string to its shortest length by doing a series of operati 阅读全文
posted @ 2019-03-15 21:30 zihao,wang 阅读(113) 评论(0) 推荐(0)
 
 

2019年3月14日

移除元素-leetcode-27
摘要: class Solution {public: int removeElement(vector<int>& nums, int val) { if(nums.size()==0) return nums.size(); int count=0; for(int i=0;i<nums.size(); 阅读全文
posted @ 2019-03-14 11:24 zihao,wang 阅读(120) 评论(0) 推荐(0)
 
删除排序数组中的重复项-leetcode-26
摘要: public: int removeDuplicates(vector<int>& nums) { int size=nums.size(); if(size<=1) return size; int cnt = 1; for (int i = 1; i < nums.size();i++) { i 阅读全文
posted @ 2019-03-14 10:35 zihao,wang 阅读(80) 评论(0) 推荐(0)
 
 

2019年3月4日

cin.ignore
摘要: 功能:函数用于输入流。它读入字符,直到已经读了num 个字符(默认为1)或是直到字符delim 被读入(默认为EOF).其调用形式为cin.ignore(n,终止字符) 原型:istream &ignore( streamsize num=1, int delim=EOF ); 函数作用是跳过输入流 阅读全文
posted @ 2019-03-04 22:03 zihao,wang 阅读(142) 评论(0) 推荐(0)
 
 

2019年1月6日

合并两个有序链表
摘要: 方法一: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */class 阅读全文
posted @ 2019-01-06 19:07 zihao,wang 阅读(338) 评论(0) 推荐(0)
 
 

2019年1月5日

有效括号方法二
摘要: class Solution { // Hash table that takes care of the mappings. private HashMap<Character, Character> mappings; // Initialize hash map with mappings. 阅读全文
posted @ 2019-01-05 18:59 zihao,wang 阅读(185) 评论(0) 推荐(0)
 
有效括号
摘要: class Solution {public: bool isValid(string s) { int flag=1; //标志位 int len=s.size(); if(len==0) { return true; } //判断输入是否为空 char str[len]; int top=0; 阅读全文
posted @ 2019-01-05 18:56 zihao,wang 阅读(121) 评论(0) 推荐(0)
 
 
下一页

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3