Skip to content

Prority Queue (or) MIN Heap(Small to Big) - STRING sorting #84

@SharedMocha

Description

@SharedMocha

import java.util.*;
public class HelloWorld{

 public static void main(String []args){
    System.out.println("Hello World");
    PriorityQueue<String> temp = new PriorityQueue<String>();
    temp.add("sam");
    temp.add("lavada");
    temp.add("kusk");
    temp.add("3");
    
    while(!temp.isEmpty()){
        System.out.println(temp.poll());
    }
    
    
 }

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions