Post

Arrays Data Structures

Arrays Data Structures
  • Things to look out for during interviews

    • Clarify if there are duplicate values in the array. Would the presence of duplicate values affect the answer? Does it make the question simpler or harder?
    • When using an index to iterate through array elements, be careful not to go out of bounds.
    • Be mindful about slicing or concatenating arrays in your code. Typically, slicing and concatenating arrays would take O(n) time. Use start and end indices to demarcate a subarray/range where possible.
  • Corner cases

    • Empty sequence
    • Sequence with 1 or 2 elements
    • Sequence with repeated elements cloze emphasizes both the repetition and order of elements in the sequence
    • Duplicated values in the sequence cloze highlights the presence of duplicate values without giving as much importance to the order of elements.
  • Essential questions

This post is licensed under CC BY 4.0 by the author.