insert element in Priority queue function working with test cases