General techniques to insert and delete node from a list