Home > Back-end >  2021-02-09: how do I remove a list the reciprocal of the first n elements?
2021-02-09: how do I remove a list the reciprocal of the first n elements?

Time:02-10

2021-02-09: how do I remove a list the reciprocal of the first n elements? # # f greatly architects a daily topic

CodePudding user response:

The List of the remove (int index) method
Write their own list, then traverse the nodes, and each node in the array, the array length - n elements will delete nodes, and the elements of the array length - n - 1 next pointer to an array of node length - n + 1 element nodes can

CodePudding user response:

List EleList=Lists. NewLinkedList ();
EleList. Add (1);
EleList. Add (2);
EleList. Add (3);
EleList. Remove (eleList. The size () - 2);
  • Related