linked list new version.
class Sll { // user defined data structure Node head ; Node tail ; int size ; void size (){ System . out . println ( "length of list is=" + size ); } void deleteAtIndex ( int ix ){ if ( ix < 0 || ix >= size ) throw new IndexOutOfBoundsException ( "invalid index" ); if ( ix == 0 ){ deleteAtStart (); return ; } if ( ix == size - 1 ){ deleteAtEnd (); return ; } Node x = head ; for ( int i = 0 ; i < ix - 1 ; i ++ ){ x = x . next ; } x . next = x . next . next ; size -- ; } void deleteAtEnd (){ if ( head == null ) throw new IllegalStateException ( "list is already empty" ); if ( head == tail ){ head = tail = null ; size -- ; return ; } Node x = head ; while ( x . next != tail ){ ...