Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

Arraylist imp for recursion

function sortHalf(List listToSort, value x):
    List firstHalf;
    List secondHalf;
    for (Integer i in listToSort):
        if i less than x then firstHalf.add(i);
        else if i greater than x then secondHalf.add(i);
    loop
    List finalList;
    finalList.addAll(firstHalf);
    finalList.addAll(secondHalf);
    return finalList;
end
Comment

Arraylist imp for recursion

function sortHalf(List listToSort, value x):
    List firstHalf;
    List secondHalf;
    for (Integer i in listToSort):
        if i less than x then firstHalf.add(i);
        else if i greater than x then secondHalf.add(i);
    loop
    List finalList;
    finalList.addAll(firstHalf);
    finalList.addAll(secondHalf);
    return finalList;
end
Comment

PREVIOUS NEXT
Code Example
Java :: multi threading callable 
Java :: codding loop 
Java :: interviewbit_java 
Java :: consumer 
Java :: jakarta allow cross origins 
Java :: write a code to print second last word of input string 
Java :: java initialize dynamic array of boolean 
Java :: two array structures in java 
Java :: Java Catching base and child exception classes 
Java :: TestNG Data Provider 
Java :: foreign keys in json 
Java :: Fomating .json 
Java :: error message pushes button down 
Java :: metodi di javascritp 
Java :: jaspersoft masking 
Java :: RTC_WAKEUP 
Java :: hadoop fs get size of directory java 
Java :: java switch case enum 
Java :: how to convert a jsonobject to a dbobject 
Java :: core java mcq 
Java :: linux mint switch language 
Java :: use scanner class in global scope java 
Java :: staging and production environment logging spring boot 
Java :: java for loop example 
Java :: cypher query having multiple values 
Java :: functionality of predicate functional interface in java 
Java :: class BuildConfig is public, should be declared in a file named BuildConfig.java 
Java :: Java Add elements to a LinkedList 
Java :: are classes in java public by default 
Java :: Sample NavigableMap 
ADD CONTENT
Topic
Content
Source link
Name
1+8 =