Git Product home page Git Product logo

007031's Issues

챕터8 예제8-1 코드에 이해가 안가는 부분이 있습니다.

QueueAdd, QueueRemove, QueueRemoveBack 함수의 que->back, que->front 멤버변수들을 업데이트 해주는 부분에서 현재의 back 또는 front 인덱스에 1을 더해준 뒤 MAX_CAPACITY-1과 모듈러 연산을 해주는데요. 여기서 왜 MAX_CAPACITY 변수에 1을 빼주는 건지 도무지 이해가 안됩니다. 1을 빼주게 되면 큐의 공간을 하나 적게 이용하게 되면서 큐의 요소들에 의도치 않은 업데이트가 발생합니다. 아무래도 오타인 것 같은데, 오타가 아니라면 설명 부탁드립니다... ㅠㅠ

감사합니다.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.