|
“ r ” xarfi chiquvchi chiziqli qidiruv algoritmi
|
bet | 2/2 | Sana | 16.01.2024 | Hajmi | 178,9 Kb. | | #138325 |
Bog'liq Mavzu Qidiruv algoritmlari chiziqli va bi“ r ” xarfi chiquvchi chiziqli qidiruv algoritmi tuzilsin va natijalar taxlil qilinsin.
package r_xarfi;
import java.util.Iterator;
import java.util.TreeSet;
public class TreeSetExample {
public static void main(String[] args) {
System.out.println("Tree Set Example!\n");
TreeSet tree = new TreeSet();
tree.add("aaa");
tree.add("acbbb");
tree.add("aab");
tree.add("c");
tree.add("a");
Iterator iterator;
iterator = tree.iterator();
System.out.print("Tree set data: ");
//Displaying the Tree set data
while (iterator.hasNext()){
System.out.print(iterator.next() + " ");
}
}
}
http://fayllar.org
|
| |