Identify the type of array

 Interview question:

  • An array is given and it can be of four types:
    (a). increasing
    (b). decreasing
    (c). first increasing then decreasing
    (d). first decreasing then increasing
    Without traversing the array we need to tell its type.There was a long discussion on this question.

Comments

Post a Comment

Popular posts from this blog

Ubuntu – Cannot connect MySQL Workbench to MySQL server

Create Grid using React native

Implementation of lazy loading (swing)