On Monday, May 16, 2016 at 3:22:38 AM UTC+2, [email protected] wrote: > I've been programming in Java. Does it make sense to switch to C for integer > or character-related problems?
C? No. C++? Possibly. C++ is generally less verbose than Java, which is nice when you need to crank out a solution in as little time as possible. C++ also has some useful algorithms and data structures that might not be readily available in the Java standard library (e.g. std::next_permutation, lower_bound on sets/maps, etc.). Finally, C++ programs tend to be a bit more efficient, allowing you to get away with somewhat less efficient solutions than would be possible in other languages. The reason I wouldn't recommend C is that it lacks many high-level data structures which are available in Java, C++, Python, and so on. For all practical purposes, C++ is a superset of C anyway, so even if you don't use the full language or standard library, C++ is strictly more feature-rich. That being said, the Google Code Jam is usually pretty good at avoiding problems that are easy to solve in one language but hard in another, so it shouldn't matter too much which language you decide to use, especially if your default is Java, which is a pretty decent all-round language. If you already know Java well, I would suggest you focus on your problem solving ability rather than learning a new language. -- You received this message because you are subscribed to the Google Groups "Google Code Jam" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/google-code/bf5fc78e-c30d-423a-87b6-bdbdcba53160%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
