[Coding] Islands count. Given a 5x5 matrix where 1 represents a land and 0 represent a water. Write a function that will count the islands in the given matrix. What's an island? If 1 has an adjacent 1 in any direction (N, NE, E, SE, S, SW, W, NW) it forms an island. -- [code javascript] --- var m = [ [1, 1, 0, 0, 0], [0, 1, 0, 0, 1], [1, 0, 0, 1, 1], [0, 0, 0, 0, 0], [1, 0, 1, 0, 1] ]; function islandsCount(map) { // your code here return 0; } console.log("Number of islands: ", islandsCount(m)); -- [end code javascript] --- Expected count is 5.
Lead Android Developer Interview Questions
10,457 lead android developer interview questions shared by candidates
Difference between Hashmap and Hashtable?
Code challenge about getting data from a comics api
about my current salary and my expected salary
English Communication
Virtual functions in c++
Implement, fetch, cache and search query and API request
- how we can download 1000s of images and display is list form without ANR - how to use Facebook login - how activity lift cycle works - if start service 100 times how much time onCreate and onStart() will call - OOPs concept - Collections
how is life and how its going
It was based on Android fundamentals only.
Viewing 7831 - 7840 interview questions
See Interview Questions for Similar Jobs
Sr Android DeveloperSenior Android DeveloperAndroid DevelopersLead Android EngineerJunior Android DeveloperAndroid Application DeveloperLead Ios EngineerSenior Android Software EngineerAndroid Applications DeveloperSenior Android Applications DeveloperAndroid Software DeveloperLead Mobile DeveloperMobile Applications Developer AndroidLead Mobile EngineerFreelance Ios DeveloperSenior Mobile Ios DeveloperHybrid Mobile App DeveloperHybrid Mobile Developer