renmoqiqi / 100-days-of-ios-datastructure-algorithm Goto Github PK
View Code? Open in Web Editor NEW100天iOS数据结构与算法实战
License: MIT License
100天iOS数据结构与算法实战
License: MIT License
I found that you didn't add the data to the new array. So I think it should be replaced like this:
- (void)compressedStack
{
NSUInteger capacitySize = (NSUInteger)(self.maxStackSize * 0.9);
NSUInteger stackSize = self.stackArray.count;
if (stackSize < capacitySize)
{
NSMutableArray *newArray = [[NSMutableArray alloc] initWithCapacity:stackSize];
for (id object in self.stackArray)
{
[newArray addObject:object];
}
self.stackArray = newArray;
self.maxStackSize = stackSize;
}
}
应该使用如下的方法实现吧?
- (BOOL)isEmpty
{
// if (self.queueArray.count == 0)
if (self.countOfQueue == 0)
{
return YES;
}
return NO;
}
- (NSInteger)countOfQueue
{
// return self.queueArray.count;
return self.queueArray.count - self.headIndex;
}
看了有APP而且上架了 满心欢喜的去打算下载 结果要18元RMB 😀 改为1元如何
共勉
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.