gilbutitbook / 007031 Goto Github PK
View Code? Open in Web Editor NEW<실전대비 C 알고리즘 인터뷰> 소스 코드
<실전대비 C 알고리즘 인터뷰> 소스 코드
QueueAdd
, QueueRemove
, QueueRemoveBack
함수의 que->back
, que->front
멤버변수들을 업데이트 해주는 부분에서 현재의 back 또는 front 인덱스에 1을 더해준 뒤 MAX_CAPACITY-1
과 모듈러 연산을 해주는데요. 여기서 왜 MAX_CAPACITY
변수에 1을 빼주는 건지 도무지 이해가 안됩니다. 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.