自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 收藏
  • 关注

原创 java c++ 程序员 技术面试常用问题

问题 JVM如何加载一个类的过程,双亲委派模型中有哪些方法?  HashMap如何实现的? HashMap和Concurrent HashMap区别, Concurrent HashMap 线程安全吗, Concurrent HashMap如何保证 线程安全? HashMap和HashTable 区别,HashTable

2016-05-03 16:29:27 370

原创 合并两个排序链表

/* struct ListNode { int val; struct ListNode *next; ListNode(int x) : val(x), next(NULL) { } };*/ class Solution { public: ListNode* Merge(ListNode* pHead1, ListNode* pHead2) {

2016-03-17 13:59:17 194

原创 单链表的操作

#include using namespace std; struct ListNode { int m_nvalue; ListNode* m_pNext; }; void addToTail(ListNode* pHead,int value){ ListNode *pNode = new ListNode(); pNode -> m_nvalue = v

2016-03-16 20:21:52 189

原创 替换字符串 c++

#include using namespace std; void replaceBlanks(char *string,int length){ if(string==NULL||length<0) return; int originalLength=0; int numbersofBlanks=0; int i=0; while(s

2016-03-16 17:49:29 296

原创 在二维数组中的查找

#include using namespace std; bool find(int data[],int rows,int columns,int k){ bool found=false; if(data!=NULL||rows>0||columns>0){ int row=0; int column=columns-1; w

2016-03-16 17:20:48 220

原创 桶排序 c++ 实现

#include #include using namespace std; void sortAges(int ages[],int length){ if(ages==NULL||length<=0){ return; } const int oldestAge=99; int timesofAge[oldestAge+1]; for(

2016-03-16 17:05:25 496

原创 快速排序 c++ 实现

#include using namespace std; void swap(int *num1,int *num2){ int temp=*num1; *num1=*num2; *num2=temp; } int partition(int data[],int length,int start,int end){ if(data==NULL||lengt

2016-03-16 16:13:46 170

转载 strcpy 的实现

// //C语言标准库函数strcpy的一种典型的工业级的最简实现。 //返回值:目标串的地址。 //对于出现异常的情况ANSI-C99标准并未定义,故由实现者决定返回值,通常为NULL。 //参数:des为目标字符串,source为原字符串。 char* strcpy(char* des,const char* source)   {   char* r=des;

2016-03-04 16:13:57 203

转载 C语言中const有什么用途

const修饰的数据类型是指常类型,常类型的变量或对象的值是不能被更新的。 const关键字的作用主要有以下几点: (1)可以定义const常量,具有不可变性。 例如: const int Max=100; int Array[Max]; (2)便于进行类型检查,使编译器对处理内容有更多了解,消除了一些隐患。例如: void f(const int i) { .........

2016-03-04 16:11:28 3960

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除