My Github address

Notes on data Structures and Algorithms

Notes for geek Time iOS Developer Class

IOS large factory interview high frequency algorithm summary

Summary of iOS interview materials

Image cache

  • How to design an image caching framework?

  • How do images read and write, and what is the process?
    • The Hash value of the image URL is used as the Key

  • What are the issues that need to be considered in memory design?
    • The size of storage

    • Elimination strategy
      • Elimination on a first-in-first-out basis

      • LRU algorithm (if used within 30 minutes)

  • What are the considerations in disk design?
    • storage
    • Size limit (e.g. 100MB)
    • Elimination strategy (e.g., a graph stored event is more than 7 days old)
  • What issues should be considered in the design of the network part?
    • Maximum number of concurrent image requests
    • Request Timeout Policy
    • Request priority
  • What is the decoding method for different formats of pictures?
    • Apply policy pattern to decode different picture formats
    • After the disk is read, the network request is returned, and the picture is decoded.
  • threading

Reading Time statistics

  • How to design a time statistics framework?

  • Why different types of loggers, what are your considerations?
    • Record encapsulation and adaptation based on different classification scenarios.
  • How do you deal with the loss of recorded data for some reason?
    • Periodic Disk write
    • Limit the number of cache entries (for example, 10 hops). If the number exceeds the threshold, the disk is written
  • What are the specific scenarios for delayed upload?
    • Front and background switching
    • From hopeless to net change
    • Universal lightweight interface piggyback
  • How does upload time put me?
    • Immediately upload
    • Delay to upload
    • Time to upload

Complex page architecture

  • MVVM framework idea

  • RN’s idea of data flow

  • System UIView update mechanism idea
  • FaceBook’s open source framework AsyncDisplayKit for pre-typesetting design ideas

Overall client architecture

  • Decoupling between services
    • openurl
    • Dependency injection

Structure/framework interview summary

  • Image cache
  • Reading Time statistics
  • Complex page architecture
  • Overall client architecture