5844
points
Questions
3096
Answers
237
-
- 3111 views
- 1 answers
- 0 votes
-
- 4197 views
- 1 answers
- 0 votes
-
“Silence“
Silence is so delicate that even mentioning Breaks Silence by creating noise.
- 4527 views
- 1 answers
- 0 votes
-
ITERATIVE SOLUTION-
/* * File: main.cpp * Author: akash * * Created on 12 August, 2015, 4:57 PM */ #include <stdio.h> #include <stdlib.h> struct node { int data; struct node* next; }; //void push(struct **node top_head,int dataToEnter); //int getCount(struct *node top_head); void push(struct node** top_head,int dataToEnter) { struct node* add_node = (struct node*) malloc(sizeof(struct node)); add_node->data = dataToEnter; add_node->next = (*top_head); (*top_head) = add_node; } int getCount(struct node* top_head){ if (top_head == NULL) return 0; // count is 1 + count of remaining list return 1 + getCount(top_head->next); } int main(){ struct node* head = NULL; push(&head, 10); push(&head, 20); push(&head, 30); push(&head, 40); push(&head, 20); push(&head, 30); printf("Nodes Count is %d", getCount(head)); return 0; }
This answer accepted by SherlockHolmes. on 6th November 2015 Earned 20 points.
- 7298 views
- 1 answers
- 0 votes
-
The letter “E”.
considering word “week”, it has two similar letters that is “E”
and for the word year, has one “E”.This answer accepted by SherlockHolmes. on 14th September 2016 Earned 20 points.
- 4203 views
- 1 answers
- 0 votes
-
1 2 3
SUM = 1+2+3=6
PRODUCT = 1*2*3 =6- 3262 views
- 2 answers
- 1 votes
-
Four Coins
Three coins placed flat on the table in a triangle(touching each other) and put the fourth one on top of them in the middle.
- 4951 views
- 1 answers
- 0 votes
-
Pi + Rats + Caribbean
Pirates of the Caribbean
- 6596 views
- 3 answers
- 2 votes
-
Take any 13 cards and flip them all. Rest 39 cards will make another pile. These two piles will have the same number of cards facing up. Why? Well, say out of those 13 selected cards are facing up. Which means that in the pile with 39 cards there will be cards facing up. When you flip all 13 cards, number of cards facing up now becomes which is equal to what the other pile have.
- 6911 views
- 1 answers
- 1 votes
-
- 14823 views
- 2 answers
- 0 votes