In a distributed system, you need to efficiently search for a particular value across multiple sorted arrays. How would you approach this problem?

  • Binary Search
  • Hashing
  • Indexing
  • Linear Search
Binary Search is the optimal approach for searching in sorted arrays due to its logarithmic time complexity O(log n). Linear Search is inefficient for large datasets, Hashing may not be suitable for sorted arrays, and Indexing might introduce additional overhead in a distributed system.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *