Search Engine Software Developer Interview Questions | Glassdoor

Search Engine Software Developer Interview Questions

1

Search engine software developer interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

Given an array of integers, find the largest possible number you can make from all the integers combined.

1 Answer

public class Solution { public String largestNumber(int[] num) { if(num == null || num.length == 0){ return "0"; } StringBuilder sb = new StringBuilder(); NumberString[] nums = new NumberString[num.length]; for(int i = 0; i { String str; public NumberString(int num){ str = num + ""; } public int compareTo(NumberString other) { String str1 = this.str + other.str; String str2 = other.str + this.str; return str2.compareTo(str1); } } }