You are not logged in. Please login at to post your questions!


[closed] Help me please ZCO is approaching

Please someone can help me on what should i study in these 3 days please list me the Data Structures & Algorithms that is frequently asked in ZCO and link to some Resources that would be useful for me in preparation of ZCO

:: What i know already ::

1 Basics of Programming in C & C++
2 Some useful stl stuff for example __gcd, sort, binary_search. It would be nice if any of you can list some more    useful STL stuff which would be helpful for me for preparation of ZCO
3 Searching & Sorting

asked 06 Nov '16, 11:45

coder_voder's gravatar image

accept rate: 8%

closed 14 Dec '16, 21:00

The question has been closed for the following reason "Other" by coder_voder 14 Dec '16, 21:00

Hi @coder_voder. I participated in ZCO 2k14. here are few of the things which i found important.
Firstly STL docs are provided as reference during the contest so you must not worry much about their syntax but yes stacks and queues from stl are most important parts during coding algorithms and even in ad-hoc problems.You should try them atleast once if haven't tried them before. STL sets/maps are important and can reduce you effort of programming trees and even can save your day.For details go to this link on topcoder.

Out of the two problems in ZCO if you are able to solve even one of them there are very high chances that you will qualify. So first look at both of the questions and then decide which one to code first. And generally what i saw when i was preparing was that there are ad-hoc problems in zco once a while which are relatively easy to code as they don't require any special algorithms ; you shouldn't loose on them.

As part of algorithms that are asked in ZCO are all amongst the standard ones listed on Iarcs website. But as you have less time you should see the graph algorithms and dp.Mostly there is a question amongst them.

Finally wish you all the best.
Pls upvote if you find it helpful. For any query comment below.


answered 17 Nov '16, 16:52

diveshuttam's gravatar image

accept rate: 27%

edited 17 Nov '16, 20:07

Can you please categorize the ZCO previous years problems?

(18 Nov '16, 20:00) coder_voder2★

for 2016 first problem was based on sorting(in nlogn). second problem can be done in variety of approaches due to lower limits. i would have done it with simple loops which i will classify as ad-hoc but i saw solutions which used dp also.
Ps I am not very good at classifying these.

(19 Nov '16, 00:41) diveshuttam3★

Usually there is one question on Dynamic Programming AFAIK.. But becoming good in dp in 3 days is very difficult..

lower_bound() and upper _bound() functions are also quite useful and I suggest learning their usage as well.

PS.: I am no expert :P


answered 16 Nov '16, 22:06

aneesh2312's gravatar image

accept rate: 8% you can learn these things but 3 days are quiet less for that so i suggest just learn top 3 or 4 algos


answered 16 Nov '16, 22:29

shivshankar8's gravatar image

accept rate: 25%

built in function of C++, Usefull for binary manupulation like...

Number of leading zeroes: builtin_clz(x)

Number of trailing zeroes : builtin_ctz(x)

Number of 1-bits: __builtin_popcount(x)

Fpr fast Input and output use


template <typename t=""> inline void fi(T &a) { register char c=0; while (c<33) c=getchar(); a=0; int tmp = 0; while (c>33) { if ( c == 45 ) tmp = 1; else a=a*10+c-'0'; c=getchar(); } if ( tmp == 1 ) a = 0-(a); }


template<typename t=""> void outpos(T n){if(n<0){outchar('-');n*=-1;}char snum[65];int i=0;do {snum[i++]=n%10+'0';n/=10;}\ while(n);i=i-1;while(i>=0)outchar(snum[i--]);outchar('\n');}

use range based loop like--

std::vector<int> v = {0, 1, 2, 3, 4, 5};

for (const int& i : v) // access by const reference
    std::cout << i << ' ';
std::cout << '\n';

for (auto i : v) // access by value, the type of i is int
    std::cout << i << ' ';


0 1 2 3 4 5

0 1 2 3 4 5


answered 17 Nov '16, 15:20

bansal1232's gravatar image

accept rate: 16%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 06 Nov '16, 11:45

question was seen: 1,362 times

last updated: 14 Dec '16, 21:00