Lead Android Developer Interview Questions

2,232 lead android developer interview questions shared by candidates

1.Given a string, write a function that return if it is Palindrome. This wasn't asked directly but from interviewer example i was need to understand that this function must ignore all spaces and special symbols. 2. Given an array, write a function that return true if any 3 elements of this array can sum to 0. My first solution was the simplest and far from best which result in O(n^3). Then interviewer asked me to improve to improve it to O(n^2). This give me a hint that i can use Hash to reduce complexity.
avatar

Android Developer

Interviewed at Meta

3.6
Jan 19, 2015

1.Given a string, write a function that return if it is Palindrome. This wasn't asked directly but from interviewer example i was need to understand that this function must ignore all spaces and special symbols. 2. Given an array, write a function that return true if any 3 elements of this array can sum to 0. My first solution was the simplest and far from best which result in O(n^3). Then interviewer asked me to improve to improve it to O(n^2). This give me a hint that i can use Hash to reduce complexity.

Puzzle: There are 4 persons (A, B, C, and D) who want to cross a bridge in night. A takes 1 minute to cross the bridge. B takes 2 minutes to cross the bridge. C takes 5 minutes to cross the bridge. D takes 10 minutes to cross the bridge. There is only one torch with them and the bridge cannot be crossed without the torch. There cannot be more than two persons on the bridge at any time, and when two people cross the bridge together, they must move at the slower person. What is the minimum time required to cross the bridge
avatar

Android Developer

Interviewed at OneBanc Technologies Pvt. Ltd

4.9
May 28, 2024

Puzzle: There are 4 persons (A, B, C, and D) who want to cross a bridge in night. A takes 1 minute to cross the bridge. B takes 2 minutes to cross the bridge. C takes 5 minutes to cross the bridge. D takes 10 minutes to cross the bridge. There is only one torch with them and the bridge cannot be crossed without the torch. There cannot be more than two persons on the bridge at any time, and when two people cross the bridge together, they must move at the slower person. What is the minimum time required to cross the bridge

Q1: If there is a new Android engineer, how will you suggest the best practice of async jobs in Android? (And the detail about AsyncTask, Executor, Thread interrupt, memory leak...and so on) Q2: Give an unsorted array, find the kth smallest item (Can you do it more quickly?)
avatar

Android Developer

Interviewed at Meta

3.6
Dec 18, 2016

Q1: If there is a new Android engineer, how will you suggest the best practice of async jobs in Android? (And the detail about AsyncTask, Executor, Thread interrupt, memory leak...and so on) Q2: Give an unsorted array, find the kth smallest item (Can you do it more quickly?)

You’re writing a monitoring app that periodically checks if a website is up. Of those listed below, what is the BEST way to schedule these periodic checks? A. Register a WakeLock with PowerManager. B. Call setInexactRepeating on AlarmManager. C. Post to a Handler with postDelayed. D. Call setPeriodicTimer on TimerService.
avatar

Android Developer

Interviewed at Meta

3.6
May 1, 2015

You’re writing a monitoring app that periodically checks if a website is up. Of those listed below, what is the BEST way to schedule these periodic checks? A. Register a WakeLock with PowerManager. B. Call setInexactRepeating on AlarmManager. C. Post to a Handler with postDelayed. D. Call setPeriodicTimer on TimerService.

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++; }
avatar

Android Developer

Interviewed at Smartprix

3.4
Aug 3, 2016

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++; }

Viewing 1 - 10 interview questions

Glassdoor has 2,232 interview questions and reports from Lead android developer interviews. Prepare for your interview. Get hired. Love your job.