Skip to content

刘昕level1#56

Open
lxambulance wants to merge 18 commits into
luckymark:masterfrom
lxambulance:master
Open

刘昕level1#56
lxambulance wants to merge 18 commits into
luckymark:masterfrom
lxambulance:master

Conversation

@lxambulance
Copy link
Copy Markdown

why no one review?

@lxambulance lxambulance changed the title I have finished level1,but why...? 刘昕level1 Mar 28, 2017
@lxambulance
Copy link
Copy Markdown
Author

No one review.So sad!!!!

Copy link
Copy Markdown
Owner

@luckymark luckymark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

先看到这里吧

@@ -0,0 +1,174 @@
1096322496508590 1903449202398069 9267431101690988 2084002749856384 11451852237618100 17282689457704726 17388128293725574 3401747568339045
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是什么鬼?

#include "Queue.h"

Queue::Queue(int x){
element=(int *)malloc(sizeof(int)*x);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c++里使用new和delete,来代替malloc和free更好;相对来说,new比malloc更具有语义

return element[head+1];
}

bool Queue::isfull(){
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isFull 或者 is_full 都更好一些,可以根据自己的喜好选择一种风格,在所有代码中坚持使用

#define ROF(i,b,a) for (int i=b;i>=a;--i)
inline int read(){
int x=0,f=1; char ch=getchar();
while (ch<'0'||ch>'9') { if (ch=='-') f=-1; ch=getchar(); }
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不要把代码写到同一行中!!!重要的事儿说三遍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants