Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~1K People Reached
Favorite Forums
Favorite Tags
c++ x 25
Member Avatar for catchmrbharath

The question is Let's consider a triangle of numbers in which a number appears in the first line, two numbers appear in the second line, three in the third line, etc. Develop a program which will compute the largest of the sums of numbers that appear on the paths starting …

Member Avatar for siddhant3s
0
257
Member Avatar for catchmrbharath

I wrote a code to get factorial for a number uptil 100. The problem i have is that i have to display the array it is sstored in a single output. So i cant use for statement and print each element. [CODE=CPP]#include<iostream> #include<cstdio> using namespace std; int main() { int …

Member Avatar for siddhant3s
0
100
Member Avatar for catchmrbharath

[CODE=CPP]#include<iostream> #include<cstdio> #include<stack> using namespace std; bool opgreater(char ,char); bool opgreater(char a ,char b) { if(a=='^') return 1; else return((a=='*' || a== '/')>=(b=='*' || b=='/')); } int main() { int n; scanf("%d",&n); while (n--) { stack<char> exp; string initial; string final=""; int i=0; bool x; char temp,temp2; getline(cin,initial,'\n'); initial+='\0'; while(initial[i]!='\0') …

Member Avatar for csurfer
0
224
Member Avatar for catchmrbharath

I am having a problem in implementing of sieve of eratosthenes.. please check the code and tell me the error [CODE] #include<iostream> #include<cstdio> using namespace std; int main() { int i,j; long array[100001]; int count=0; for(i=1;i<100001;i++) { array[i]=i; } for(i=2;i<100001;i++) { if(array[i]!=0) { cout<<""<<array[i]<<endl; int j=0; j=i*i; while(j<100001) { array[j]=0; …

Member Avatar for siddhant3s
0
289
Member Avatar for catchmrbharath

I was coding for a particular problem whose time limit was 2 seconds.. The no. of input was max 300000. Simply taking in the number using cin and outputting the same number with cout will take more than 2 seconds. Any ideas on how to increase efficiency??

Member Avatar for s_sridhar
0
140
Member Avatar for catchmrbharath

I wanted to know an efficient algorithm to calculate the product of divisors.. My brute force method is giving me a Time limit exceeded.

Member Avatar for ArkM
0
135
Member Avatar for catchmrbharath

I was trying to find the number of zeroes in a factorial of a number. The time limit was 2 sec. Max number of test cases being 100000 my code is as follows [code=cpp] #include<iostream> #include<cstdio> int five(int number); int two(int number); using namespace std; main() { int num; int …

Member Avatar for Sky Diploma
0
140