removes and returns the item on this queue that was least recently added . concode_field_sep int N concode_elem_sep Item[] q concode_elem_sep int last concode_elem_sep int first concode_elem_sep int i concode_field_sep Item next concode_elem_sep void enqueue concode_elem_sep Iterator<Item> iterator concode_elem_sep int size concode_elem_sep boolean isEmpty concode_elem_sep void resize concode_elem_sep boolean hasNext concode_elem_sep void main concode_elem_sep void remove concode_elem_sep Item peek
Item function ( ) { if ( isEmpty ( ) ) throw new NoSuchElementException ( "srini_string" ) ; Item loc0 = q [ first ] ; q [ first ] = null ; N -- ; first ++ ; if ( first == q . length ) first = 0 ; if ( N > 0 && N == q . length / 4 ) resize ( q . length / 2 ) ; return loc0 ; }