@abhishek why do you need a pointer the the previous node of the node pointedby q? it is written in the question node to be deleted is an intermediate node.
if question is to delete the last node then we need a pointer which will point to the second last node. hence to delete last TC is O(n) and other than last node each node can be deleted in O(1)