{"id":15027022,"url":"https://github.com/anitaa1990/android-cheat-sheet","last_synced_at":"2026-01-30T08:04:02.502Z","repository":{"id":40625850,"uuid":"135305722","full_name":"anitaa1990/Android-Cheat-sheet","owner":"anitaa1990","description":"Cheat Sheet for Android Interviews","archived":false,"fork":false,"pushed_at":"2024-11-12T03:39:25.000Z","size":358,"stargazers_count":2247,"open_issues_count":10,"forks_count":693,"subscribers_count":99,"default_branch":"master","last_synced_at":"2025-05-12T00:34:44.507Z","etag":null,"topics":["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"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anitaa1990.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-29T14:08:42.000Z","updated_at":"2025-05-10T20:37:12.000Z","dependencies_parsed_at":"2024-01-03T04:58:00.180Z","dependency_job_id":"36a21cf0-c2a5-4f2e-b0ac-9d9fff6765e8","html_url":"https://github.com/anitaa1990/Android-Cheat-sheet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/anitaa1990/Android-Cheat-sheet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anitaa1990%2FAndroid-Cheat-sheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anitaa1990%2FAndroid-Cheat-sheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anitaa1990%2FAndroid-Cheat-sheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anitaa1990%2FAndroid-Cheat-sheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anitaa1990","download_url":"https://codeload.github.com/anitaa1990/Android-Cheat-sheet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anitaa1990%2FAndroid-Cheat-sheet/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260120446,"owners_count":22961730,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["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"],"created_at":"2024-09-24T20:05:38.011Z","updated_at":"2026-01-30T08:03:57.447Z","avatar_url":"https://github.com/anitaa1990.png","language":"Java","readme":"# Android-Cheat-sheet\nCheat Sheet for Android Interviews. **Updated the list to include the latest android components available in 2024.**\n\n## Topics\n* [Common Coding Programs](#common-coding-programs)\n* [Data Structure Coding Programs](#data-structure-coding-programs)\n* [Android Interview Series – Part 1 (Android basics)](https://medium.com/@anitaa_1990/android-interview-series-2024-part-1-android-basics-23a713f4a648)\n* [Android Interview Series – Part 2 (Android expert)](https://medium.com/@anitaa_1990/android-interview-series-2024-part-2-android-intermediate-472e0e787725)\n* [Android Interview Series – Part 3 (Java basics)](https://medium.com/android-news/android-interview-questions-cheat-sheet-part-ii-bea0633f0da7)\n* [Android Interview Series – Part 4 (Kotlin basics)](https://medium.com/@anitaa_1990/android-interview-series-2024-part-4-kotlin-basics-16531ee54e8a)\n* [Android Interview Series – Part 5 (Kotlin coroutines)](https://medium.com/@anitaa_1990/android-interview-series-2024-part-5-kotlin-coroutines-3dd1ae81c721)\n* [Android Interview Series – Part 6 (Kotlin Flows)](https://medium.com/@anitaa_1990/android-interview-series-2024-part-6-kotlin-flows-730f6bf877df)\n* [Android Interview Series – Part 7 (Jetpack Compose)](https://medium.com/@anitaa_1990/android-interview-series-2024-part-7-jetpack-compose-ff7d2ecd9018)\n\u003c/br\u003e\n\n\n### Common Coding Programs\n* \u003cb\u003eArrays\u003c/b\u003e\u003c/br\u003e\n  * [Find Maximum Sell Profit](/src/arrays/FindMaximumSellProfit.java)\n  * [Find Low \u0026 High Index of a key from a given array](/src/arrays/LowHighIndex.java)\n  * [Merge Overlapping Intervals](/src/arrays/MergeOverlappingIntervals.java)\n  * [Move all zeros in an array to the Left or Right](/src/arrays/MoveZeroesToLeft.java)\n  * [Rotate an array](/src/arrays/RotateArray.java)\n  * [Find the smallest common number in a given array](/src/arrays/SmallestCommonNumber.java)\n  * [Find the sum of two elements in a given array](/src/arrays/SumOfTwoValues.java)\n  * [Find the minimum distance between two numbers in an array](/src/arrays/MinimumDistanceBetweenTwoNumbers.java)\n  * [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)\n  * [Find second largest element in an array](/src/arrays/FindSecondLargestElement.java)\n  * [Find the 3 numbers in an array that produce the max product](/src/arrays/FindMaxProduct.java)\n  * [Find missing number from an array](/src/arrays/FindMissingNumber.java)  \n  \u003c/br\u003e\n\n\n\n* \u003cb\u003eDynamic Programming\u003c/b\u003e\u003c/br\u003e\n   * [Fibonacci Series](/src/dynamicprogramming/FibonacciSeries.java)\n   * [Given an array, find the contiguous subarray with the largest sum](/src/dynamicprogramming/LargestSumSubarray.java)\n   * [Find the maximum sum of a subsequence such that no consecutive elements are part of the subsequence](/src/dynamicprogramming/MaxSumSubsequenceOfNonadjacentElements.java)\n   * [Given a score \"n\", find the total number of ways score \"n\" can be reached](/src/dynamicprogramming/GameScoring.java)\n   * [Compute Levenshtein distance between two strings](/src/dynamicprogramming/LevenshteinDistance.java)\n   * [Given coin denominations and the total amount, find out the number​ of ways to make the change](/src/dynamicprogramming/CoinChangingProblem.java)   \n   \u003c/br\u003e\n   \n   \n   \n* \u003cb\u003eQueues\u003c/b\u003e\u003c/br\u003e\n   * [Find the Maximum in a Sliding Window](/src/queue/Dequeue.java)\n   * [Implement a queue using stack](/src/queue/QueuesUsingStack.java)\n   \u003c/br\u003e\n\n\n   \n* \u003cb\u003eLinkedList\u003c/b\u003e\u003c/br\u003e\n   * [Reverse a Linked List](/src/linkedlist/ReverseLinkedList.java)\n   * [Remove duplicates from a Linked List](/src/linkedlist/RemoveDuplicates.java)\n   * [Delete Node of a given key from a Linked List](/src/linkedlist/DeleteNodeWithKey.java)   \n   * [Find the Middle Node of a Linked List](/src/linkedlist/FindMiddleNode.java)\n   * [Find the Nth Node of a Linked List](/src/linkedlist/FindNthNode.java)\n   * [Check if a Linked List is cyclic](/src/linkedlist/CheckIfContainsCycle.java)\n   * [Insertion Sort of a Linked List](/src/linkedlist/InsertSortLinkedList.java)\n   * [Intersection Point of Two Lists](/src/linkedlist/IntersectionPoints.java)\n   * [Nth from last node](/src/linkedlist/NthFromLastNode.java)\n   * [Swap Nth Node with Head](/src/linkedlist/SwapNthNodeWithHead.java)\n   * [Merge Two Sorted Linked Lists](/src/linkedlist/MergeLinkedList.java)\n   * [Sorting LinkedList using merge sort](/src/linkedlist/MergeSortList.java)\n   * [Reverse nodes at even indices](/src/linkedlist/ReverseEvenNodes.java)\n   * [Rotate linked list by n](/src/linkedlist/RotateLinkedList.java)\n   * [Reverse every 'k' elements in a linked list](/src/linkedlist/ReversekElements.java)\n   * [Add the head pointers of two linked lists](/src/linkedlist/AddTwoIntegers.java)   \n   \u003c/br\u003e   \n   \n   \n   \n* \u003cb\u003eStacks\u003c/b\u003e\u003c/br\u003e\n   * [Evaluate an expression](/src/stacks/EvaluationExpression.java)\n   * [Implement a stack using queues](/src/stacks/StacksUsingQueues.java)\n   * [Check if paranthesis are equal](/src/stacks/EqualDelimiters.java)\n   * [Tower of Hanoi](/src/stacks/TowerOfHanoi.java)\n   * [ReverseAStack](/src/stacks/ReverseStack.java)\n   \u003c/br\u003e\n   \n   \n\n* \u003cb\u003eBack Tracking\u003c/b\u003e\u003c/br\u003e\n   * [Solve Boggle](/src/backtracks/Boggle.java)\n   * [Print paranthesis combination for a given value](/src/backtracks/Parenthesis.java)\n   * [Solve N queen problem](/src/backtracks/NQueenProblem.java)\n   * [find all the subsets of the given array that sum up to the number K](/src/backtracks/KSumSubsets.java)\n   \u003c/br\u003e\n   \n   \n* \u003cb\u003eGraphs\u003c/b\u003e\u003c/br\u003e\n   * [Clone a Directed Graph](/src/graphs/CloneDirectedGraph.java)\n   * [Minimum Spanning Tree](/src/graphs/MinimumSpanningTree.java)\n   * [Form circular chain by given list of words](/src/graphs/WordChaining.java)   \n   \u003c/br\u003e \n   \n   \n* \u003cb\u003eTrees\u003c/b\u003e\u003c/br\u003e\n   * [Implements an InOrder Iterator on a Binary Tree](/src/trees/BinaryTreeIterator.java)\n   * [Convert a binary tree to a doubly linked list](/src/trees/BinaryTreeToLinkedList.java)\n   * [Connect a sibling pointer of a binary tree to next node in the same level](/src/trees/ConnectAllSiblings.java)\n   * [Given a binary tree, connect its siblings at each level](/src/trees/ConnectSiblings.java)\n   * [Delete any subtrees whose nodes sum up to zero](/src/trees/DeleteZeroSumSubTrees.java)\n   * [Given roots of two binary trees, determine if these trees are identical](/src/trees/IdenticalBinaryTree.java)\n   * [Find the Inorder successor of a node in binary Search Tree](/src/trees/InOrderSuccessor.java)\n   * [Algorithm to traverse the tree inorder](/src/trees/InOrderTraversal.java)\n   * [Check if a given tree is a binary search tree](/src/trees/IsBST.java)\n   * [Display node values at each level in a binary tree](/src/trees/LevelOrderTraversal.java)\n   * [Swap the 'left' and 'right' children for each node in a binary tree](/src/trees/MirrorBinaryTreeNodes.java)\n   * [Find nth highest node in a Binary Search Tree](/src/trees/NthHighestBST.java)\n   * [Print nodes forming the boundary of a Binary Search Tree](/src/trees/PrintTreePerimeter.java)\n   * [Serialize binary tree to a file and then deserialize back to tree](/src/trees/SerializeBinaryTree.java)   \n   \u003c/br\u003e\n\n\n* \u003cb\u003eStrings\u003c/b\u003e\u003c/br\u003e\n   * [Reverse String](/src/strings/ReverseString.java)\n   * [Palindrone String](/src/strings/PalindroneStrings.java)\n   * [Regular Expression](/src/strings/RegularExpression.java)\n   * [Remove Duplicates](/src/strings/RemoveDuplicates.java)\n   * [Remove White Spaces](/src/strings/RemoveWhiteSpaces.java)\n   * [Remove a String](/src/strings/ReverseString.java)\n   * [String Segmentation](/src/strings/StringSegmentation.java)\n   * [Find next highest permutation of a given string](/src/strings/NextHighestPermutation.java)\n   * [Check if two strings are anagrams](/src/strings/CheckIfAnagram.java)   \n   \u003c/br\u003e\n   \n   \n* \u003cb\u003eIntegers\u003c/b\u003e\u003c/br\u003e\n   * [Reverse Integer](/src/math/ReverseInteger.java)\n   * [Find sum of digits of an integer](/src/math/FindSumOfInteger.java)   \n   * [Find Next highest Number from a Integer](/src/math/NextHighestNumber.java)\n   * [Check if it is an Armstrong number](/src/math/CheckIfArmstrongNumber.java)\n   * [Find the factorial of a number](/src/math/FindFactorial.java)\n   * [Print all prime numbers upto the given number](/src/math/PrintPrimeNumbers.java)\n   * [Find all the prime factors of a given integer](/src/math/FindPrimeFactors.java)\n   * [Check if a given number is binary](/src/math/CheckIfBinary.java)\n   * [Find kth permutation](/src/math/KthPermutation.java)\n   * [Integer Division](/src/math/IntegerDivision.java)\n   * [Find Pythagorean Triplets](/src/math/FindPythagoreanTriplets.java)\n   * [Print all possible sum combinations using positive integers](/src/math/SumCombinations.java)\n   * [Find Missing Number](/src/math/FindMissingNumber.java)   \n   * [Find all subsets of a given set of integers](/src/math/IntegerSubsets.java)\n   * [Given an input string, determine if it makes a valid number](/src/math/NumberValidity.java)\n   * [Calculate 'x' raised to the power 'n'](/src/math/PowerOfNumber.java)\n   * [Calculate square root of a number](/src/math/CalculateRoot.java)\n   * [Minimum Number of Platforms Required for a Railway/Bus Station](/src/math/MinimumPlatforms.java)   \n   \u003c/br\u003e   \n   \n   \n* \u003cb\u003eMiscellaneous\u003c/b\u003e\u003c/br\u003e\n   * [Find three integers in the array with sum equal to the given value](/src/misc/SumOfThreeValues.java)\n   * [Find position of a given key in 2D matrix](/src/misc/SearchMatrix.java)\n   * [Determine the host byte order of any system](/src/misc/HostByteOrder.java)\n   * [Find the point that requires the least total distance covered by all the ​people to meet at that point](/src/misc/ClosestMeetingPoint.java)\n   * [Given a two dimensional array, if any element in it is zero make its whole row and column zero](/src/misc/SumOfThreeValues.java)\n   \u003c/br\u003e   \n  \n  \n### Data Structure Coding Programs\n* \u003cb\u003eSorting\u003c/b\u003e\u003c/br\u003e\n   * [BubbleSort](/src/sort/BubbleSort.java)\n   * [InsertionSort](/src/sort/InsertionSort.java)\n   * [SelectionSort](/src/sort/SelectionSort.java)\n   * [QuickSort](/src/sort/QuickSort.java)\n   * [MergeSort](/src/sort/MergeSort.java)\n     * \u003cb\u003eQuestion: Why is quicksort preferred over merge sort for sorting arrays?\u003c/b\u003e\u003c/br\u003e\n         * 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.\u003c/br\u003e\n     * \u003cb\u003eQuestion: Why is merge sort preferred over quicksort for sorting linked lists?\u003c/b\u003e\u003c/br\u003e\n         * 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.     \n   \u003c/br\u003e\n   \n   \n* \u003cb\u003eSearching\u003c/b\u003e\u003c/br\u003e\n   * [Binary Search](/src/search/BinarySearch.java)\n   * [Rotated Binary Search](/src/search/RotatedBinarySearch.java)\n   * [Ternary Search](/src/search/TernarySearch.java)  \n     * \u003cb\u003eQuestion: Why is binary search preferred over ternary search?\u003c/b\u003e\u003c/br\u003e\n         * 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.\n   \u003c/br\u003e\n   \n   \n* \u003cb\u003eRuntime Complexity Table:\u003c/b\u003e\u003c/br\u003e\n   \u003ca href=\"https://github.com/anitaa1990/Android-Cheat-sheet/blob/master/media/4.png\" target=\"_blank\"\u003e\u003cimg src=\"https://github.com/anitaa1990/Android-Cheat-sheet/blob/master/media/4.png\"\u003e\u003c/a\u003e\u003c/br\u003e\n     \n      \nI will be adding more questions soon! If you would like to contribute to the Android Cheat Sheet, just make a pull request!\n      \n  \n  \n  \n  \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanitaa1990%2Fandroid-cheat-sheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanitaa1990%2Fandroid-cheat-sheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanitaa1990%2Fandroid-cheat-sheet/lists"}