Senior android developer Interview Questions | Glassdoor.co.uk

# Senior android developer Interview Questions

29

senior android developer interview questions shared by candidates

## Top Interview Questions

Sort: RelevancePopular Date

4 Aug 2017
 Write algorithm to convert number for example 16 138 832 into "sixteen million one hundred thirty eight thousand eight hundred thirty two"3 AnswersIt was hard to write under pressure. Basically, I was using HashMap. Key for integer, value for spelling. Solution you can find somewhere at leetcodehaven't checked leetcode, but how about this? firstly use (int)(Math.log10(number) + 1) to get the number of digits in the given number. (Note: you have to handle 0 differently) e.g 16138832 should return 8. Use this number of digits to get an idea of digit place's spelling (billion, million, thousand, hundred) Then for each digit (0~9) I'm thinking of using the previous answer's suggestion of HashMap to get the spelling. So I imagine there would be two HashMaps, one for getting the digit spelling (one, two, ... nine, ten, ... , nineteen), the other for the digit place spelling (billion, million, thousand, hundred, ... thirty, twenty)Here is the answer. Sorry for the extra spaces :) private static String spellNumber(String number) { HashMap level1Num = new HashMap(); level1Num.put(1, " one "); level1Num.put(2, " two "); level1Num.put(3, " three "); level1Num.put(4, " four "); level1Num.put(5, " five "); level1Num.put(6, " six "); level1Num.put(7, " seven "); level1Num.put(8, " eight "); level1Num.put(9, " nine "); level1Num.put(10, " ten "); level1Num.put(11, " eleven "); level1Num.put(12, " twelve "); level1Num.put(13, " thirteen "); level1Num.put(14, " fourteen "); level1Num.put(15, " fifteen "); level1Num.put(16, " sixteen "); level1Num.put(17, " seventeen "); level1Num.put(18, " eighteen "); level1Num.put(19, " ninteen "); HashMap level2Num = new HashMap(); level2Num.put(2, " twenty "); level2Num.put(3, " thirty "); level2Num.put(4, " fourty "); level2Num.put(5, " fifty "); level2Num.put(6, " sixty "); level2Num.put(7, " seventy "); level2Num.put(8, " eighty "); level2Num.put(9, " ninty "); String output = ""; while (number.length() > 0) { String block; if (number.length() % 3 == 0) { block = number.substring(0, 3); } else { block = number.substring(0, (number.length() % 3)); } if (block.length() > 2) { output += level1Num.get(Integer.parseInt(block.substring(0, 1))) + " hundred "; number = number.replace(block.subSequence(0, 1), ""); block = block.replace(block.subSequence(0, 1), ""); } int block2 = Integer.parseInt(block); if (block2 = 7 && number.length() = 4 && number.length() <= 6) { output += " thousand"; } number = number.replace(block, ""); } return output; }

### Senior Android Developer at Huma was asked...

1 Nov 2018
 2 arrays with duplicate numbers on each ones... try to find the numbers not present in the other. How to make an efficient algorithm? (Although it was very difficult to even understand the task due to a bad explanation)1 AnswerI explained different ways to approach a solution algorithm, from looping separately each array, or shifting items from one into the other, or even changing the data structure. (At the end the guys where not interested in the way you were thinking, they were more interested in ridicule you because you didn't come up with the correct answer straight away) The answer was changing the data structure by the way (classic).

### Senior Android Developer at Huma was asked...

1 Nov 2018

4 Aug 2017
 Ways how to save persistent data 1 AnswerSharedPreferences, Sqlite, External storages

### Senior Android Developer at Scandit was asked...

7 Dec 2019
 Design a scanning interface class with a couple of methods and 2 different implementations. Explain how would you allow multiple implementations to call the se methods.1 Answerit could be answered in multiple ways, but it has proven to me that the team doese not know much about dependency injection and insisted on answers around strategy pattern etc.

### Senior Android Developer at Huma was asked...

1 Nov 2018
 Tell me about design patterns, what do you think about MVP, MVC, and MVVM?1 AnswerI did not give definitions but explained why and when each was useful for in real scenarios. (Probably they did expect just definitions because they were paying a lot of attention of what I was saying...)

### Senior Android Developer at Nous Infosystems was asked...

20 Feb 2020
 what's is oops conceptBe the first to answer this question

1 Oct 2018