top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

Find number of islands of '1' in D dimensional array containing '0', '1'. where D > 2.

+2 votes
71 views
Find number of islands of '1' in D dimensional array containing '0', '1'. where D > 2.
posted May 26, 2016 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes
As D dimension array in the programming language is nothing while it is the conceptual representation of in one dimension array allocated memory in the consecutive location  fashion So in your problem we can find Iceland by traversing array using pointers and can be counted a number of islands.
answer May 28, 2016 by Rajan Paswan
Similar Questions
+1 vote

Array consist of -1 and 1, Find count of all sub-arrays where sum = 0.
Input:
[-1,1,-1,1]

Output:
4
[-1,1] [1,-1],[-1,1],[-1,1,-1,1]

+2 votes

You have a binary tree which consists of 0 or 1 in the way, that each node value is a LOGICAL AND between its children:

      0
   /    \
  0      1
 / \    / \
0   1  1   1

You need to write a code, which will invert given LEAF and put tree in a correct state.

Note: Received by some user over whatsapp, sharing in exact form?

0 votes

Write a c program that rotate elements of an array by the value of configured number "n".
For example:
Input array[ ] = { 2, 3, 5, 6, 8, 9}
value of n = 2
Output array[] = { 5, 6, 8, 9, 2, 3}
I am looking for efficient program.

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...