keep first m nodes and delete next n nodes

Given a singly link list, you have to keep first M nodes and then delete next N nodes, again keep M nodes and delete next N nodes and so on.Write a algo for this.

Comments

Popular posts from this blog