Efficient Algorithms for Classification