Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

刘昕level1 #56

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open

刘昕level1 #56

wants to merge 18 commits into from

Conversation

lxambulance
Copy link

why no one review?

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

No one review.So sad!!!!

Copy link
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
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
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
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
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