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.
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]
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?
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.