added longest consecutive sequence algorithm