Your question is Android Domain and Coding. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Explain the Android domain concepts and programming challenges you expect to handle in a mobile engineering interview.
For the coding portion, implement a validator for an Android Activity callback sequence. Return True only when every callback follows the simplified lifecycle transition rules below. The function accepts a list of callback names and returns a Boolean.
onCreate starts the Activity. Valid transitions are onCreate to onStart or onDestroy, onStart to onResume or onStop, onResume to onPause, onPause to onResume or onStop, and onStop to onRestart or onDestroy. onRestart must transition to onStart; onDestroy is terminal.
def is_valid_activity_lifecycle(events):