void function ( String [ ] arg0 ) { MinPQ < String > loc0 = new MinPQ < String > ( ) ; while ( ! StdIn . isEmpty ( ) ) { String loc1 = StdIn . readString ( ) ; if ( ! loc1 . equals ( "srini_string" ) ) loc0 . insert ( loc1 ) ; else if ( ! loc0 . isEmpty ( ) ) StdOut . print ( loc0 . delMin ( ) + "srini_string" ) ; } StdOut . println ( "srini_string" + loc0 . size ( ) + "srini_string" ) ; }
unit tests the minpq data type . concode_field_sep Key[] pq concode_elem_sep Comparator<Key> comparator concode_elem_sep MinPQ<Key> copy concode_elem_sep int N concode_field_sep Key next concode_elem_sep Key delMin concode_elem_sep boolean isMinHeap concode_elem_sep boolean isMinHeap concode_elem_sep void sink concode_elem_sep boolean isEmpty concode_elem_sep void insert concode_elem_sep boolean hasNext concode_elem_sep void remove concode_elem_sep Iterator<Key> iterator concode_elem_sep Key min concode_elem_sep int size concode_elem_sep void exch concode_elem_sep void resize concode_elem_sep boolean greater concode_elem_sep void swim