[ create a new paste ] login | about

Link: http://codepad.org/AIw6KxQN    [ raw code | fork ]

Plain Text, pasted on Aug 21:
1
Convert the code to Java. The original code uses C pointers very well, and it's good practice to figure out the alternatives in a different language. Java versions use either String.charAt (indexing instead of pointers) or String.substring (closer to the pointer version). Neither seems as clear as the C code, and neither is as compact. Although performance isn't really part of this exercise, it is interesting to see that the Java implementation runs roughly six or seven times slower than the C versions.


Create a new paste based on this one


Comments: