Implement method oneEditApart that return boolean: true, if using one operations (insert or remove or replace) we can modify one string to get another. False otherwise. // Signature: boolean oneEditApart(String s1, String s2) // Allowing operations insert remove replace Example: oea("cat", "cut") => true // replace "u" -> "a" oea("cat", "cuts") => false // no operations oea("ca", "ca") => false // no operations oea("cats", "cat") => true // remove "s" oea("cat", "at") => true // insert "c" oea("cat", "cbat") => true // remove "b"
Android Developer Interview Questions
10,446 android developer interview questions shared by candidates
You have an Activity, and you implement push notification, when you receive a notification, and you tap on it, the PendingIntent launched point to your Activity. If you open a notification, and your Activity is visible in that moment, in which method of the activity you receive the intent with the information of the push message?
coding task
Which programming languages you are proficient at?
Which of these standard Java collections is fastest to use if you want to find a specific element? An unsorted Vector TreeSet A sorted LinkedList
Algorithm question was how to find the lowest common ancestor for a binary tree. Then find a solution that is linear for space complexity.
Given 2 lists how to get the smallest common item between them.
THE SUN RISE IN EAST Print the above sentence with out duplicating chars ?
The following function is stripping (removing) all the characters in string stripChars from the end of the string str? The function is incomplete. What code should be there in place of the comment? public static String stripEnd(final String str, final String stripChars) { if (str == null) return str; int end = str.length(); int INDEX_NOT_FOUND = -1; if(end == 0) return str; else if (stripChars.isEmpty()) { return str; } else { // ********************* // What's the code here? // ********************* } return str.substring(0, end); } while (end != 0 && str.indexOf(stripChars.charAt(end - 1)) == INDEX_NOT_FOUND) { end++; } while (end != 0 && str.indexOf(stripChars.charAt(end - 1)) != INDEX_NOT_FOUND) { end--; } while (end != 0 && stripChars.indexOf(str.charAt(end - 1)) != INDEX_NOT_FOUND) { end--; } while (end != 0 && stripChars.indexOf(str.charAt(end - 1)) == INDEX_NOT_FOUND) { end++; }
Name the different stages of an android activity.
Viewing 31 - 40 interview questions