Posted: Sat Feb 23, 2002 5:07 am
I have a problem from the Waterloo CCC from 2000: Given the HTML source code for N websites (N < 100), each of which can contain K links (K < 100). At the end of input, you're also given the URL of two websites and asked to see if you can get from the first website to the second just by using links.
My problem with this is that since URL can be up to 80 characters long, and each page can link to 100 links, this means you'd need to store 80*100*100 characters, or 800K in memory! Isn't that too much, considering you'd also have to have some sort of a way to store the actual graph of the websites? How is it possible to solve this problem?
Also, does anybody know of any websites that explain generic, typical algorithms, like Dynamic Programming, etc.?
Any help would be appreciated.
My problem with this is that since URL can be up to 80 characters long, and each page can link to 100 links, this means you'd need to store 80*100*100 characters, or 800K in memory! Isn't that too much, considering you'd also have to have some sort of a way to store the actual graph of the websites? How is it possible to solve this problem?
Also, does anybody know of any websites that explain generic, typical algorithms, like Dynamic Programming, etc.?
Any help would be appreciated.