remove element from queue function is working with test cases.