added lexicographical_compare algorithm & test cases

Please review.