added lexicographical_compare algorithm & test cases