CommonLounge is a community of learners who learn together. Get started with the featured resources above, ask questions and discuss related stuff with everyone.
Tricks and Tweaks to code quickly and efficientlyby Jeswin Jacob
This discussion is for expanding your array of maneuvers needed to code quickly and efficiently.
The first and most important thing that I'd like to discuss about is the C++ STL. Learning it would enable you to code up an assortment of algorithms and complicated data structures in a matter of seconds.
You can learn to use the C++ STL from the following amazing sites:
Studytonight : Contains syntax and examples for most of the STL containers and algorithms.
Sanfoundry : Shows how to implement what you've learnt in complete programs
Topcoder(Highly recommended) : This place teaches yo...
Read more…(242 words)
Language choiceby Rachit Mukherjee
which language is better and easy to learn ?
Read more…(9 words)
Need help from NEPALby Khagendra Khatri
Hello! I have been coding in c++ for a year. I am studying A-level and I want to prepare for IOI. But I realised that i have to take part in NOI(national olympiad of informatics). So, how to prepare for regional and national level?
Read more…(44 words)
[Discussion] What is it like to compete in IOI?by Keshav Dhandhania
Would love to hear the experiences of people who went to IOI.
Read more…(12 words)
ZCO OR ZIOby Dheeraj Peddireddy
Can I write Zco first or should I follow the order
Read more…(11 words)
What is the best way to represent adjacency lists in C++98by Tanavya Dimri
INOI is coming up soon, and seeing that only C++98 was provided in ZCO, I won't be surprised (but would be upset) that they provide the same in INOI.
Normally I represent undirected graphs as an unordered_map of vectors, like this:
unordered_map <int, vector <int>> graph;
For directed graphs, I may use an unordered_map of unordered_maps to store the weights.
However, what is the best way to do so in C++98, especially for sparse graphs. Do I have to resort to something like: int graph[n][n] which would consume quite a lot of space, as it is basically just an adjacency matrix.