Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/anitaa1990/Android-Cheat-sheet

Cheat Sheet for Android Interviews
https://github.com/anitaa1990/Android-Cheat-sheet

activity-lifecycle android android-interview-practice android-interview-questions android-interviews android-service asynctask cheat-sheets coding fragments intent interview-questions java java-interview-questions problems programming stack trending-repositories trending-topics worker-threads

Last synced: 25 days ago
JSON representation

Cheat Sheet for Android Interviews

Awesome Lists containing this project

README

        

# Android-Cheat-sheet
Cheat Sheet for Android Interviews. **Updated the list to include the latest android components available in 2024.**

## Topics
* [Common Coding Programs](#common-coding-programs)
* [Data Structure Coding Programs](#data-structure-coding-programs)
* [Android Interview Series – Part 1 (Android basics)](https://medium.com/@anitaa_1990/android-interview-series-2024-part-1-android-basics-23a713f4a648)
* [Android Interview Series – Part 2 (Android expert)](https://medium.com/@anitaa_1990/android-interview-series-2024-part-2-android-intermediate-472e0e787725)
* [Android Interview Series – Part 3 (Java basics)](https://medium.com/android-news/android-interview-questions-cheat-sheet-part-ii-bea0633f0da7)
* [Android Interview Series – Part 4 (Kotlin basics)](https://medium.com/@anitaa_1990/android-interview-series-2024-part-4-kotlin-basics-16531ee54e8a)
* [Android Interview Series – Part 5 (Kotlin coroutines)](https://medium.com/@anitaa_1990/android-interview-series-2024-part-5-kotlin-coroutines-3dd1ae81c721)
* [Android Interview Series – Part 6 (Kotlin Flows)](https://medium.com/@anitaa_1990/android-interview-series-2024-part-6-kotlin-flows-730f6bf877df)
* [Android Interview Series – Part 7 (Jetpack Compose)](https://medium.com/@anitaa_1990/android-interview-series-2024-part-7-jetpack-compose-ff7d2ecd9018)

### Common Coding Programs
* Arrays
* [Find Maximum Sell Profit](/src/arrays/FindMaximumSellProfit.java)
* [Find Low & High Index of a key from a given array](/src/arrays/LowHighIndex.java)
* [Merge Overlapping Intervals](/src/arrays/MergeOverlappingIntervals.java)
* [Move all zeros in an array to the Left or Right](/src/arrays/MoveZeroesToLeft.java)
* [Rotate an array](/src/arrays/RotateArray.java)
* [Find the smallest common number in a given array](/src/arrays/SmallestCommonNumber.java)
* [Find the sum of two elements in a given array](/src/arrays/SumOfTwoValues.java)
* [Find the minimum distance between two numbers in an array](/src/arrays/MinimumDistanceBetweenTwoNumbers.java)
* [Find the maximum difference between the values in an array such that the largest values always comes after the smallest value](/src/arrays/FindMaxDifference.java)
* [Find second largest element in an array](/src/arrays/FindSecondLargestElement.java)
* [Find the 3 numbers in an array that produce the max product](/src/arrays/FindMaxProduct.java)
* [Find missing number from an array](/src/arrays/FindMissingNumber.java)

* Dynamic Programming
* [Fibonacci Series](/src/dynamicprogramming/FibonacciSeries.java)
* [Given an array, find the contiguous subarray with the largest sum](/src/dynamicprogramming/LargestSumSubarray.java)
* [Find the maximum sum of a subsequence such that no consecutive elements are part of the subsequence](/src/dynamicprogramming/MaxSumSubsequenceOfNonadjacentElements.java)
* [Given a score "n", find the total number of ways score "n" can be reached](/src/dynamicprogramming/GameScoring.java)
* [Compute Levenshtein distance between two strings](/src/dynamicprogramming/LevenshteinDistance.java)
* [Given coin denominations and the total amount, find out the number​ of ways to make the change](/src/dynamicprogramming/CoinChangingProblem.java)




* Queues
* [Find the Maximum in a Sliding Window](/src/queue/Dequeue.java)
* [Implement a queue using stack](/src/queue/QueuesUsingStack.java)


* LinkedList
* [Reverse a Linked List](/src/linkedlist/ReverseLinkedList.java)
* [Remove duplicates from a Linked List](/src/linkedlist/RemoveDuplicates.java)
* [Delete Node of a given key from a Linked List](/src/linkedlist/DeleteNodeWithKey.java)
* [Find the Middle Node of a Linked List](/src/linkedlist/FindMiddleNode.java)
* [Find the Nth Node of a Linked List](/src/linkedlist/FindNthNode.java)
* [Check if a Linked List is cyclic](/src/linkedlist/CheckIfContainsCycle.java)
* [Insertion Sort of a Linked List](/src/linkedlist/InsertSortLinkedList.java)
* [Intersection Point of Two Lists](/src/linkedlist/IntersectionPoints.java)
* [Nth from last node](/src/linkedlist/NthFromLastNode.java)
* [Swap Nth Node with Head](/src/linkedlist/SwapNthNodeWithHead.java)
* [Merge Two Sorted Linked Lists](/src/linkedlist/MergeLinkedList.java)
* [Sorting LinkedList using merge sort](/src/linkedlist/MergeSortList.java)
* [Reverse nodes at even indices](/src/linkedlist/ReverseEvenNodes.java)
* [Rotate linked list by n](/src/linkedlist/RotateLinkedList.java)
* [Reverse every 'k' elements in a linked list](/src/linkedlist/ReversekElements.java)
* [Add the head pointers of two linked lists](/src/linkedlist/AddTwoIntegers.java)




* Stacks
* [Evaluate an expression](/src/stacks/EvaluationExpression.java)
* [Implement a stack using queues](/src/stacks/StacksUsingQueues.java)
* [Check if paranthesis are equal](/src/stacks/EqualDelimiters.java)
* [Tower of Hanoi](/src/stacks/TowerOfHanoi.java)
* [ReverseAStack](/src/stacks/ReverseStack.java)


* Back Tracking
* [Solve Boggle](/src/backtracks/Boggle.java)
* [Print paranthesis combination for a given value](/src/backtracks/Parenthesis.java)
* [Solve N queen problem](/src/backtracks/NQueenProblem.java)
* [find all the subsets of the given array that sum up to the number K](/src/backtracks/KSumSubsets.java)



* Graphs
* [Clone a Directed Graph](/src/graphs/CloneDirectedGraph.java)
* [Minimum Spanning Tree](/src/graphs/MinimumSpanningTree.java)
* [Form circular chain by given list of words](/src/graphs/WordChaining.java)



* Trees
* [Implements an InOrder Iterator on a Binary Tree](/src/trees/BinaryTreeIterator.java)
* [Convert a binary tree to a doubly linked list](/src/trees/BinaryTreeToLinkedList.java)
* [Connect a sibling pointer of a binary tree to next node in the same level](/src/trees/ConnectAllSiblings.java)
* [Given a binary tree, connect its siblings at each level](/src/trees/ConnectSiblings.java)
* [Delete any subtrees whose nodes sum up to zero](/src/trees/DeleteZeroSumSubTrees.java)
* [Given roots of two binary trees, determine if these trees are identical](/src/trees/IdenticalBinaryTree.java)
* [Find the Inorder successor of a node in binary Search Tree](/src/trees/InOrderSuccessor.java)
* [Algorithm to traverse the tree inorder](/src/trees/InOrderTraversal.java)
* [Check if a given tree is a binary search tree](/src/trees/IsBST.java)
* [Display node values at each level in a binary tree](/src/trees/LevelOrderTraversal.java)
* [Swap the 'left' and 'right' children for each node in a binary tree](/src/trees/MirrorBinaryTreeNodes.java)
* [Find nth highest node in a Binary Search Tree](/src/trees/NthHighestBST.java)
* [Print nodes forming the boundary of a Binary Search Tree](/src/trees/PrintTreePerimeter.java)
* [Serialize binary tree to a file and then deserialize back to tree](/src/trees/SerializeBinaryTree.java)

* Strings
* [Reverse String](/src/strings/ReverseString.java)
* [Palindrone String](/src/strings/PalindroneStrings.java)
* [Regular Expression](/src/strings/RegularExpression.java)
* [Remove Duplicates](/src/strings/RemoveDuplicates.java)
* [Remove White Spaces](/src/strings/RemoveWhiteSpaces.java)
* [Remove a String](/src/strings/ReverseString.java)
* [String Segmentation](/src/strings/StringSegmentation.java)
* [Find next highest permutation of a given string](/src/strings/NextHighestPermutation.java)
* [Check if two strings are anagrams](/src/strings/CheckIfAnagram.java)



* Integers
* [Reverse Integer](/src/math/ReverseInteger.java)
* [Find sum of digits of an integer](/src/math/FindSumOfInteger.java)
* [Find Next highest Number from a Integer](/src/math/NextHighestNumber.java)
* [Check if it is an Armstrong number](/src/math/CheckIfArmstrongNumber.java)
* [Find the factorial of a number](/src/math/FindFactorial.java)
* [Print all prime numbers upto the given number](/src/math/PrintPrimeNumbers.java)
* [Find all the prime factors of a given integer](/src/math/FindPrimeFactors.java)
* [Check if a given number is binary](/src/math/CheckIfBinary.java)
* [Find kth permutation](/src/math/KthPermutation.java)
* [Integer Division](/src/math/IntegerDivision.java)
* [Find Pythagorean Triplets](/src/math/FindPythagoreanTriplets.java)
* [Print all possible sum combinations using positive integers](/src/math/SumCombinations.java)
* [Find Missing Number](/src/math/FindMissingNumber.java)
* [Find all subsets of a given set of integers](/src/math/IntegerSubsets.java)
* [Given an input string, determine if it makes a valid number](/src/math/NumberValidity.java)
* [Calculate 'x' raised to the power 'n'](/src/math/PowerOfNumber.java)
* [Calculate square root of a number](/src/math/CalculateRoot.java)
* [Minimum Number of Platforms Required for a Railway/Bus Station](/src/math/MinimumPlatforms.java)



* Miscellaneous
* [Find three integers in the array with sum equal to the given value](/src/misc/SumOfThreeValues.java)
* [Find position of a given key in 2D matrix](/src/misc/SearchMatrix.java)
* [Determine the host byte order of any system](/src/misc/HostByteOrder.java)
* [Find the point that requires the least total distance covered by all the ​people to meet at that point](/src/misc/ClosestMeetingPoint.java)
* [Given a two dimensional array, if any element in it is zero make its whole row and column zero](/src/misc/SumOfThreeValues.java)



### Data Structure Coding Programs
* Sorting
* [BubbleSort](/src/sort/BubbleSort.java)
* [InsertionSort](/src/sort/InsertionSort.java)
* [SelectionSort](/src/sort/SelectionSort.java)
* [QuickSort](/src/sort/QuickSort.java)
* [MergeSort](/src/sort/MergeSort.java)
* Question: Why is quicksort preferred over merge sort for sorting arrays?
* Quicksort does not require any extra storage whereas merge sort requires O(n) space allocation. Allocating/de-allocating memory space can increase the run time.
* Question: Why is merge sort preferred over quicksort for sorting linked lists?
* There is a difference in linked lists due to memory allocation. In linked lists we can insert items in the middle in O(n) space and time. There is no extra memory allocation required.



* Searching
* [Binary Search](/src/search/BinarySearch.java)
* [Rotated Binary Search](/src/search/RotatedBinarySearch.java)
* [Ternary Search](/src/search/TernarySearch.java)
* Question: Why is binary search preferred over ternary search?
* When dividing an array by k ( 2(binary) or 3(ternary)), it reduces the array size to 1/k. But it increases the no of comparisons by k.



* Runtime Complexity Table:



I will be adding more questions soon! If you would like to contribute to the Android Cheat Sheet, just make a pull request!