Note 1

Take Note:

Take a note while surfing.





Note With Ink

Give your Note a Colorful Tag.




Easy to Access

Stay on same information and in Sync wherever you are.

Note 2

Take Note:

Organize your information,It may take Shape.





Think With Ink

Differ your Content by Color.




Easy to Access

Easy to pull up your content from anywhere anytime.

Note 3

Take Note:

Don't Let information to miss,Because it take shape





Note With Ink

Simple an Easy Way to take a note.




Easy to Access

Get the same in next visit.


Please wait...

Companies

  •  Accenture
  •  Adobe
  •  Alcatel-Lucent
  •  Amazon
  •  Amdocs
  •  Aricent
  •  Broadcom Ltd
  •  Brocade
  •  CA Technologies
  •  Cavium Networks
  •  Ciena
  •  Cisco
  •  Citrix
  •  Cognizant
  •  Deloitte
  •  EFI
  •  Ericsson
  •  Genpact
  •  Global Edge
  •  GlobalLogic
  •  Happiest Minds
  •  HCL Technologies
  •  Hewlett Packard Enterprise
  •  Incedo
  •  Infinite C S
  •  IpInfusion
  •  ISD Infotech
  •  J.P. Morgan
  •  Juniper Network
  •  MosChip Semiconductor
  •  NEC Technologies
  •  OLA
  •  Qualcomm
  •  Radisys
  •  Redeem Software
  •  Reliance Jio
  •  Rolta India Limited
  •  Samsung
  •  Sasken
  •  Synopsys
  •  Tavant Technologies
  •  TCS
  •  Tech Mahindra
  •  Wipro
  •  XiLinx

Interview Questions and Answers :: Data Structure

    Answer:
    void GetNthFromLast(struct node* head, int n)
    {
    int len = n, i;
    struct node *temp = *temp1 = head;

    while (temp != NULL)
    {
    if (len > 0)
    {
    temp = temp->next;
    len--;
    continue;
    }

    temp = temp->next;
    temp1 = temp1->next;
    }


    if (len)
    {
    printf("\r\n Node in the given Linked list is not enough \r\n");
    return;
    }

    printf ("%d\n", temp1->data);

    return;
    }
    Please Login First :
    Tags:

    No Tags on this question yet!

    Answer:
    int *p;
    p = (int *) malloc(2 * sizeof (int));

    When memory allocation is done, the actual heap space allocated is one word larger than the requested memory. The extra word is used to store the size of the allocation and is later used by free( )
    Please Login First :
    Tags:

    No Tags on this question yet!

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

    Answer:

    1) Sort the array in ascending order.

    2) Initialize two index variables to find the 'S'

       elements in the sorted array.

           (a) Initialize first to the leftmost index: l = 0

           (b) Initialize second  the rightmost index:  r = ar_size-1

    3) Loop while l < r.

           (a) If (A[l] A[r] == S)  then return 1

           (b) Else if( A[l] A[r] <  sum )  then l

           (c) Else r--    

    4) No 'S' in whole array - return 0

    Please Login First :
    Tags:

    No Tags on this question yet!

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

    Answer:
    #include
    #include

    int main()
    {
    int row, col,i;
    int **arr ;
    printf ("Enter Row and Column\n");
    scanf("%d %d",&row,&col );
    printf("%d %d\n",row,col );
    **arr = (int **) malloc (sizeof (int)*row);
    for (i = 0; i < row; i++)
    {
    arr[i] = (int *) malloc(sizeof(int)*col);
    }
    return 0;
    }
    Please Login First :
    Tags:

    No Tags on this question yet!