Skip to content

Latest commit

 

History

History
193 lines (152 loc) · 11.3 KB

README.md

File metadata and controls

193 lines (152 loc) · 11.3 KB

Android-Cheat-sheet

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

Topics


Common Coding Programs

Data Structure Coding Programs

  • Sorting

    • BubbleSort
    • InsertionSort
    • SelectionSort
    • QuickSort
    • MergeSort
      • 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
    • Rotated Binary Search
    • Ternary Search
      • 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!