## Vifi

BAN USERForget K5 or bipartite graphs, what about a single triangle.

Can we color it using two colors only such that no two adjacent nodes are same color ? :) :)

Minimum number of different colors to color a graph is known as Chromatic number problem. Minium is 4 in my opinion.

Let's say it is not 100 , it is 5 .

And my current heap is { 27,13,5,10,8}

and new number that comes is 9. How do you find , eliminate 5 and restructure the heap. ??

Won't it be good to just keep circular list/queue, so that i know the range [ min, max] of my current top 100 elements. if number scanned is out of that range, we ignore and if number is in that range we insert it in it's correct place.

yea, but range might not be known.

I don't think one traversal O(N) to find the range will be a good idea though that can help here.

if we know the value of K, we can make virtual K lists in the existing data set itself. Keep track of begin and end of K lists with 2K indexes in dataset and keep swapping the data until all are sorted.

Threads must be having some attribute(s). For example, resource , availability , ownership etc. Based on them we can have a priority among the threads set.

And based on priority we can put them in a heap. So whenever a request comes, we take the top element from the heap and assign it. And later re-arrange the heap.

Rep**farleym761**, Accountant at AdobeEnjoy meeting up with my friends and family, and I currently volunteer as a guest columnist for my local paper ...

Rep**kevinlmoses**, Animator at AccentureI am Experienced Building Manager who is an expert in public and industrial safety with a preventative mindset against fire ...

Rep**jacksonbetty625**, Accountant at 247quickbookshelpMy work is specialized help, regardless of whether on the telephone, face to face, or distantly, identified with PC frameworks ...

Rep**mitadwilson**, Scientific Officer at Cleartrip.comHello, I am Mita from Dayton, I am working as a Systems programmer in Evans company, I have Experience of ...

Rep**myershllims**, abc at ASAPInfosystemsPvtLtdHiii, I am Myers and I am from Elizabeth. I am working as a Product designer designing most things I ...

**CareerCup**is the world's biggest and best source for software engineering interview preparation. See all our resources.

try running our program on sequence { 1,2,1,2,1,2, 219876534567324567098765423}

- Vifi November 04, 2014How big arrfrew will you allocate ??