Here is a TV avid person. He wants to spend his max time on TV. There are N channels with different program of different length and diff times. WAP so that the person can spend his max time watching TV.Precondition: If that person watches a program, he watches it completely.
Ex:
Channel1:
prog1 – 8:00- 8:30
prog2: 9:00 – 10:00
prog3: 10:15 – 12:00
channel2:
prg1 – 8:15 – 10:00
prg2: 10:30 – 12:00
So in this case max time will be if he watches:
ch2/prg1 + ch1/prg3
http://tech-queries.blogspot.com/2011/03/avid-tv-watcher.html
Ex:
Channel1:
prog1 – 8:00- 8:30
prog2: 9:00 – 10:00
prog3: 10:15 – 12:00
channel2:
prg1 – 8:15 – 10:00
prg2: 10:30 – 12:00
So in this case max time will be if he watches:
ch2/prg1 + ch1/prg3
http://tech-queries.blogspot.com/2011/03/avid-tv-watcher.html
http://tech-queries.blogspot.com/2009/05/number-of-bus-stations.html
ReplyDeleteHey Rajeev,
ReplyDeleteThanks for sharing the link. Now this blog has FB presence as well.
http://www.facebook.com/ProgrammingInterviews/