刘昕level1#56
Open
lxambulance wants to merge 18 commits into
Open
Conversation
Author
|
No one review.So sad!!!! |
luckymark
reviewed
Apr 15, 2017
| @@ -0,0 +1,174 @@ | |||
| 1096322496508590 1903449202398069 9267431101690988 2084002749856384 11451852237618100 17282689457704726 17388128293725574 3401747568339045 | |||
| #include "Queue.h" | ||
|
|
||
| Queue::Queue(int x){ | ||
| element=(int *)malloc(sizeof(int)*x); |
Owner
There was a problem hiding this comment.
c++里使用new和delete,来代替malloc和free更好;相对来说,new比malloc更具有语义
| return element[head+1]; | ||
| } | ||
|
|
||
| bool Queue::isfull(){ |
Owner
There was a problem hiding this comment.
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(); } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
why no one review?