首页
题库
面试
求职
学习
竞赛
More+
所有博客
搜索面经/职位/试题/公司
搜索
我要招人
去企业版
登录 / 注册
松华皮蛋me
三峡大学
2017届
Java工程师
www.liangsonghua.me
关注
私信
加入黑名单
举报TA
TA的博客
首页
刷题
圈子
项目
笔记
基本资料
真题试卷
在线编程
心理测试
回答的问题(29)
删除有序链表中重复的元素-II
0
class Solution { public: ListNode* deleteDuplicates(ListNode* head) { ListNode* dummy = new ListNode(-1); ListNode* slow,*fast; ...
发表于 2016-06-23 14:54:00
转动链表
0
class Solution { public: ListNode* rotateRight(ListNode* head, int k) { int len = 0; ListNode* p = head; ListNode* left = ...
发表于 2016-06-22 16:45:09
有序链表变成二叉搜索树
0
class Solution { public: TreeNode* buildBST(ListNode* begin,ListNode* end) { if(begin==end) { return NULL; ...
发表于 2016-06-19 09:19:42
回文链表
0
/* struct ListNode { int val; struct ListNode *next; ListNode(int x) : val(x), next(NULL) {} };*/ class Palindrome { public: bool isPa...
发表于 2016-06-15 10:32:19
设计并实现一个高效的最短摘要生成算法,该算法能找出S中包含所有T中的字符的最短子字符串,即最短摘要
1
#include<iostream> using namespace std; int query(string s,string t) { //用还钱来解释 remain表示还欠多少,有效归还才自减 //right表示继续还款 //left表示多还的能收回多少 /* 比如s=...
发表于 2016-06-04 10:18:24
正则表达式匹配
3
class Solution { public: bool match(string str, string pattern) { char a[100],b[100]; strcpy(a,str.c_str()); strcpy(b,pattern....
发表于 2016-06-03 19:35:05
求最长可整合子数组的长度
0
class Solution { public: /** * 在数组中求长度最大的可整合子数组长度 * arr:输入数组 * 返回:最大的可整合子数组的长度 */ int getMaxLength(vector<int> arr, int len) { ...
发表于 2016-05-28 18:55:30
在64位操作系统上,如下数据结构占用的存储空间大小为多少字节
46
**C++结构体字节对齐** ## 前言 ## > 在计算机中数据存储和传输以位(bit)为单位,每8个位bit组成1个字节(Byte)。32位计算机的字长为32位,即4个字节;对应的,64位计算机的字长为64位,即8个字节。计算机系统对基本类型数据在内存中存放的位置有限制,要求这些数...
发表于 2016-05-09 18:29:23
魔术索引II
11
#include <iostream> #include <vector> using namespace std; class MagicIndex { public: bool findMagicIndex(vector<int> A, int n,i...
发表于 2016-04-30 16:14:00
首页
上一页
1
2
3
下一页
末页
扫描二维码,关注牛客网
意见反馈
下载牛客APP,随时随地刷题