https://gateoverflow.in/3654/gate2004-it-13
there can be following assumption for this question??
1)x is data and q pointing the node having data x so in this case O(1) is fine.??
2)x is address(location) pointed by q then in this we may need traverse the link list once to get its preceding node for link adjustment hence O(n)????