Initially, VisuAlgo was not designed for small touch screens like smartphones, as intricate algorithm visualizations required substantial pixel space and click-and-drag interactions. While primarily designed for National University of Singapore (NUS) students enrolled in various data structure and algorithm courses (e.g., CS1010/equivalent, CS2040/equivalent (including IT5003), CS3230, CS3233, and CS4234), VisuAlgo also serves as a valuable resource for inquisitive minds worldwide, promoting online learning. Suhendry Effendy - VisuAlgo remains the exclusive platform for visualizing and animating several of these complex algorithms even after a decade. Steven Halim's book, 'Competitive Programming' - co-authored with Dr. ![]() Initially conceived in 2011 by Associate Professor Steven Halim, VisuAlgo aimed to facilitate a deeper understanding of data structures and algorithms for his students by providing a self-paced, interactive learning platform.įeaturing numerous advanced algorithms discussed in Dr. PS2: There is an alternative way to implement an efficient Queue using two Stacks. PS1: If you understand amortized analysis, this heavy O( N) cost when the circular array is full can actually be spread out so that each enqueue remains O( 1) in amortized sense. However, if we do not know the upper bound of queue size, we can enlarge (double) the size of the array, e.g., make M = 2*8 = 16 (two-times larger), but that will entail re-copying the items from index front to back in a slow (but rare) O( N) process to have, front = 0, and back = 7. At this point ( front = (back+1) % M)), we cannot enqueue anything else.ĭo note that if we know that our queue size will never exceed the fixed array size M, then the circular array idea is actually already a good way to implement Queue ADT. A few more enqueue operations later, we may have, front = 5, and back = 4. ![]() Yet, this does not solve the main problem of fixed-size array implementation.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |