Thanks a lot xabhi. Actually where I made mistake was that I was treating negative value as false.
Type: Posts; User: Stuart Dickson
Thanks a lot xabhi. Actually where I made mistake was that I was treating negative value as false.
I have put this question for help. If you know answer tell it to me.
I have put this question for help. If you know answer tell it to me.
Hello,
I executed this program and output was "C". Can someone expain why it was output and not "C++". Thanks.
int main(){
float a = 0.7;
if(a < 0.7)
printf("c");
else
Hello,
When I executed this program I got output -2 3 0 1. Can anyone explain what how this calculation is reached in program below. Thanks
int main(){
int i = -3, j = 2, k = 0, m;
m = ++i...
Hello.
Given a polygon (could be regular, irregular, convex, concave), find out whether a particular point lies inside it or outside it.
This question was asked within an interview. what should...
I think it would be O(n log n) because every node will be visited atleast once.
I am looking for both average as well as worst case.
Hello.
Can someone explain what is time complexity of this algorithm :
int maxDepth(struct node* node) {
if (node==NULL) {
return(0);
}
else {
Thanks.
I modified code as below, but still answer is not correct.
#include<iostream>
#include<string>
#include<cmath>
using namespace std;
Hello.
I am trying to implement atoi(). Below is my code. It compiles correctly, but output is not correct. can anyone correct what wrong i am doing in logic here.
Here is my code.
...
Thanks for your reply "zacs7"
You said that , "And perhaps mention that heap allocations may be optimised for large allocations."
What do you exactly mean by that ?
Thanks.
Hello Guys.
Why do we prefer huge memory allocations on heap rather then on stack (I am aware of general differences between heap and stack and how allocations are done in both - stack and queue)...
Hey guys !!
Thanks a lot for your replies.
iMalc you are correct here. By comparision, I meant object comparision only.
Give us the link now :)
yeah...it's not returning bool....typo mistake.......But the point is how we can optimize this code. Can anybody help ? Thanks for your help.
Hello.
I gave written test at Adobe, Bangalore. There was a question to optimize Binary search. Below is the normal code for Binary search. How can we optimize it so that there is only one...