Frequently Asked Questions
- Sometimes when I insert a element into a BST or other ordered data structure, I get strange behavior -- "-2" seems to be smaller
than "-3". What's going on?
- We use string comparisons for everything, so "-2" is in fact less than "-3" lexicographically.
We tried to mitigate confusion somewhat by automatically converting positive integers into equivalent numbers with leading zeroes,
so that positive integers would always be ordered as expected (though negative numbers are alas off).
It turns out that if you are trying to sort a group of any strings, using a mixed comparison strategy gets confusing
fast -- how should 10.4 compare to 3.1.2? What about 3A -- is that a string or a hexidecimal number?
What about AF? Should BC come before or after AFF? We made the executive decision to just do string comparisons everywhere
for consitency.
- How can I get this to work on my cellphone, which has a very small screen?
-
If you change the canvas size to something that seems reasonable for your device, we will use a cookie to remember your
preferred size. Then reload the page, and you should be set! Cell Phones are a little tricky, since their screens are so
small -- the iPhone 4 seems to work well for most algorithms, with a width of 500 and a height of 300 (though the
sorting algorithms really require a width of 900 to see everything)
- Wait ... you are using cookies?
-
Only for remembering your preferred width/height/speed. Everything will still work if you disable cookies, you just
won't get the extra convienence of having the exact right size for your device. We aren't doing tracking of any kind.
- I think I've found a bug ...
- Please email me any bug reports, at galles <at> usfca <dot> edu. The more specific, the better (that is,
excatly what sequence of operations lead to the undesired behavior).
- Can I use these materials in my classes?
- Certainly! I'd prefer that you just link to my pages rather than cache anything locally so that your
students will get the most up-to-date version of everything. If you do use this in your class, please drop me
a line to let me know about it, I'm curious to see who else will find this useful.
- Can I use this material os a base for my own visualizations?
- Yes! I will have a nice tarball with everything you need (including simple code samples) up soon. If you do use my code,
please leave in the copyright information at the beginning of each source file, and put a link to these pages from the page
where your visualizations are located. If you create something really cool, let me know and I can link to it.