AnimeshSinha1309 / algorithms-notebook

The team notebook to keep all template code and notes in.
23 stars 5 forks source link

Make all graphs use one-indexed notation #5

Open GaurangTandon opened 4 years ago

GaurangTandon commented 4 years ago

I have been using one-indexed node numbering for so long and haven't broken a sweat.

It's just so much easier to use since even all the questions use one-indexing you don't have to worry about subtracting anything while reading input and using it.

Having to subtract 1 every time after reading input feels pointless once you get used to this.

Can we just do a quick run through of our codes for enforcing this notation? Or contrary thoughts?

AnimeshSinha1309 commented 4 years ago

Although I love the 0 indexed notation and am strongly against using anything 1 indexed, I concede to your superior experience, and am willing to change that across our code. Though writing cin >> u >> v; u--, v--; is not too much of an effort, I agree that 0 indexed problems are a lot rarer on codeforces and in ICPC. Consider this and change.

AnimeshSinha1309 commented 4 years ago

One thing to think of here is that our automated testing libraries have 0 index test problems, so we would also have to rewrite all the tests as well.