Video 11 of a series explaining the basic concepts of Data Structures and Algorithms. This video introduces a variation of the queue data structure, the circular queue. This video is meant for educational purposes only.
i really like your explanation though i don't see why you used mod. Couldnt you just redefine front/rear as 0. Would seem like easier to read the code that way
no, it wont be, using modulo allows you to turn your direction in a neat and clean way. i.e. 1%24 =1 and if num. exceed den.(25%24),it will still be one. Hope this would help
Not sure for other languages but in Java, putting the addition symbols after the "rear" will cause a bug since that increments "rear" after the value is used. ++rear works better!
I didn’t realize I was watching on 360p lol. I would only see a difference if this was screen recorded on an iPad or computer. I wish more people would write on paper than white board or iPad and do it in one take. Have you encountered other RU-vid channels, with this style for DSA?