top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

As a web server developer how can you make sure you have never seen the same content before ??

+7 votes
269 views

Since web page have multiple URLs pointing to them , as a web server developer how can you make sure you have never seen the same content before ??

posted Oct 29, 2013 by Mona Sharma

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Make a binary search tree using MD5 digest algorithm of page you have visited.
then search the MD5 digest of current page in BST.
Its better to use AVL tree for fast searching.

answer Oct 29, 2013 by Vikas Upadhyay
Similar Questions
+1 vote

What is the best logic or way to detected linked list has loop ?
And also what is the best way to find out that given linked list is circular ?

+3 votes

Hamming distance between two binary numbers is the number of different bits between two numbers. With respect to 0, how many numbers are there with 10 as the hamming distance and can be represented using 15 bits.

+1 vote

This was asked today at Amazon interview -

Given two Binary Trees (not BST). Each node of both trees has an integer value. Validate whether both trees have the same integers, there could be repetitive integers.

Example
Tree1:
5
1 6
5 4 3 6

Tree2:
1
3 4
6 5

Output
Identical integers

Sample C/C++/Java code would be helpful.

+2 votes

Say we only know the worst case and best case complexity of an algo (Algo is not known). Is it possible to get the average case complexity?

+3 votes

Input: arr[] = {5, 5, 10, -10, -20, 40, 50, 35, -20, -50}
Output: 125 (40, 50, 35)

...