Seunthomas's Posts
Nairaland Forum › Seunthomas's Profile › Seunthomas's Posts
1 2 3 4 5 6 7 8 ... 15 16 17 18 19 20 21 22 23 (of 36 pages)
airsaylongcon:See this guy, i go write 100 self for you since i don know wetin i go do na. But i will wait for @guru01 to kill you first, then you will go defensive and i will supply the code. Better you start begging him down now. I will show mercy then by not supplying him the tools but if God wan catch you the guy go read the whole thread. Overconfidence worry you die and he don finish you. lol. Rolling on the floor now. lol. |
airsaylongcon:Am not judging you ohhh. Me self i dey shack but with moderation. But i am going to have fun tommorrow. lol...... |
airsaylongcon:You dey ask me?? Even running the jvm with an application using more resources and starving the jvm will cause any infinite loop to say goodnight. @guru01 will be too happy. I was not thinking clearly that time i should have remembered na. lol. I go laugh die tommorrow.... |
airsaylongcon:Na the beer dey dull you. You no get sense again. You don use alchol kill all your brain cells finish. |
airsaylongcon:A recursive function can actually terminate without an exit path a. scenerio out of memory (know this about java) b. stack overflow( saw this online) So bro guru01 was actually correct. Will inform him tommorrow, the guy go finish you. lol.... ![]() |
airsaylongcon:You own don dey finish be dat.lol. wetin u dey do for beer parlour for 1am. You dey carry gun join? |
Una don dey become my fan club members, i may soon surpass oga's on the top. Those one's don kolo for coding. LOL(legend loading......) |
airsaylongcon:Not in all cases. If i can think of a scenerio i will mention it later. |
asalimpo:Thats programming. Whats the point of writing code that wont run. If i did not run the code wont have seen all those mishots na. LOL |
airsaylongcon:I dont do that. I am here for the fun. Like i said earlier. What will it profit me to find out the women @dhtml18 has put in the family way?? LOL |
airsaylongcon:Slay who? You wey no sabi wetin you put down, your question to guru01 was wrong( now am more convinced). By the way some of those books for programmers interview are inconclusive, they just test how well you can read between the lines. At least i still have those interview skills na seeing those funny things you put down. LOL |
airsaylongcon:You should. Considering what @dhtml did and you supported(trying to find out about me), i could really do some damage to you guys ohhh. I hope it does not get to mention of my past employee. |
airsaylongcon:You don humble sha. LOL. Warehouse manager. |
@airsaylongcon The good thing about this challenge is am cracking my brain. lol See you in the morning when my power is back. You will be in real trouble then |
typedef struct t { int i; int m; struct t *b, *d; }data; int count(data *a) { if (a->m){ return 0; } return count(a->b) + count(a->d)+1; } No need am calling it a night. I need to look at it closely, right now i just fixed your typos. This runs but i have bus 10 error. C is a killer no garbage collection etc. I dont want to crash my machine |
airsaylongcon:You have so many mistakes in the code am correcting and checking with compiler. int count(struct t*a) { If (a->m) return 0; //WRONG If should be if return count(a->b) + count(a->d)+1; } |
A data structure is "built" using nodes. Each node has exactly two pointers that point to other nodes. None of the pointers is null. struct t { int i; int m; struct t *b, *d; }; Assumption 1: t->b is not null t->d is not null A data structure is basically a kind of container to store data This problem is actually a tree(cant remember which type specifically).... |
airsaylongcon:Yes boss. |
airsaylongcon:You quickly corrected your mistake na(boju boju as yoruba would say-cover up). Admit you set a wrong question and you get the answer but you may need to contact a c programmer to be sure. What i provide will actually run when compiled. |
dhtml18:Na bro, am quite calm and cool. Just laying emphasis on someone's blunder. |
Just admit that you flunked the question and did not even set it correctly... |
I will solve it ohh, with proper explanation self and well documented steps. |
Thats why the first question i asked is can you solve it? |
Seriously bro am disappointed you can descend low like this ohh airsaylongcon: Why you dey run mouth? How many hours e take you to ask me your own?. I will modify this post with the question so look out *modified* A data structure is "built" using nodes. Each node has exactly two pointers that point to other nodes. None of the pointers is null. A C program is written to count how many nodes are accessible from any of the nodes in th data structure. The code use an "indicator" field (initialized to zero for all nodes). Correct the following code so that it works properly as it will not work in its current state struct t (int i,m; struct t*b, *d) int count(struct t*a) { If (a->m) return 0; return count(a->b) + count(a->d)+1; } Am not saying i wont solve it but you asked a question and you dont even know the answer so how do i know if am correct or wrong? Just common sense... |
dhtml18:Look closely oga struct t (int i,m; struct t *b, *d) no curly bracket but normal bracket |
dhtml18:bro, one of the things that makes a good programmer is that we open our eyes and see code not look and make assumptions. Struct declaration cant be like so struct t (int i,m; struct t *b, *d) So @airsaylongcon does not know what he is typing. And if he does not know what he is typing how can i be sure he knows the correct answer and not here to waste my time. |
Ok. Firstly your struct declaration is wrong. Even a struct with pointer to itself is not written like so. Now i assuming i gave you the solution how would you know? |
dhtml18:Relax na. Since the guy did not even create a proper struct if i answer how can he mark it?? Can a teacher mark question that he does not know the answer? |
airsaylongcon:Is that a proper way for declaring a struct?? |
airsaylongcon:Now look at your struct and see what you sent? Make comparison am waiting..... |
FincoApps:You will be shocked. That you cant does not make it impossible for others. When you work for a company and your boss asks you to solve a problem in c/c++ or java or etc. Tell him "Boss common no one can master everything" lol. Anyway when you get to a point you find the middle qround and then comes understanding.. |
airsaylongcon:Ok ohhh. But you ask me a question, you cant solve it. Whats the point?? I explained the solution to question i asked you na. So if i concede this one can you explain it to me?? |
1 2 3 4 5 6 7 8 ... 15 16 17 18 19 20 21 22 23 (of 36 pages)
