- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 9
- Posts with Downvotes
- 8
- Downvoting Members
- 6
22 Posted Topics
Hi guyzz !! I have tried scouting the internet but could not get a suitable explanation. Please tell me with an example as to what are bit arrays and what are their applications. Any help would be greatly appreciated. Thanks
Hi all, I am trying to understand as to how this InputStream.read(byte[] b) function actually works. I have a doubt regarding the InputStream.read(byte[] b) function. The code is as follows:- [CODE] import java.io.*; public class SpeedReading { public static int count(String filename) throws IOException { InputStream is = new BufferedInputStream(new …
Hello guyz !!! I came across this problem and I am still unable to come up with a good algorithm to solve this problem Problem : given, 1<=n<=1000000, and 1<=k<=9 , calculate the first and last k digits of n^n. for example if n=13 and k=4, then result : first …
[/B]hello guyz .. !! i came across this interesting problem and have been trying to figure this out since... here it goes.. We are given 8 similar balls. 7 of them are identical in weight and 1 is defective. This one defective ball can be either heavy or light. We …
hello guyz.. Need urgent help on this !!! Is there a way to find out the total memory being consumed by my C++ program. I have seen in many online coding competitions that set a limit on memory consumption. Is there any tool by which I can find memory being …
Hey buddy !!! the problem with ur code is that while comparing in the if condition, if(e[i]=="{")... you are using double " " marks. here, if e is a string, then any index of that string will be a character. for example if e="hello", then e[4]='o'. so while comparing you …
[QUOTE=honeyboynasa;1169385]hi all can help me about code reverse 123 ->321. put help me[/QUOTE] i have reversed the string here by recursion.. if u hav any doubt let me know.. The code is in C++.. [CODE] #include<iostream> using namespace std; char rs[3];//array to store the reversed string void rev(string s,int i) …
hello... please elaborate the problem that u r facing in this program. the doubt u mentioned in the last 2 lines isin't clear enough..
hi frndz... i have a question.. How many integral solutions exist for `x1+x2+x3+....x100=100 given that, xi > -i` i solved this question and have found the answer to be 12758826. but the answer is not correct. could someone please help urgently with this. approach used:- suppose... x1 + x2 + …
Given 1 GB memory, input a file which contians 4 billion integers, output one integer that is not in the file. What if you have only 10 MB memory? how to go about this problem??? any efficient algorithms...
hi frnz.. have a bit of trouble here...:( i am allocating a dynamic integer array... after allocation i assign different values to every array element. now what i wish to do is to delete the array and free the memory element by element & not as a whole array at …
hi frndz.... i was wondering that given 1<n<1000000 & 1<r<1000000 how do i [B][I]efficiently[/I][/B] find nCr (combination) for any given values of n & r. please help with an efficient algorithm...
hi frndz... the problem is as follows: i want to create a 2-d array. in every index in that matrix, i want to store an array of integers. moreover the array that i want to store at every index has to be dynamic because its size will keep on increasing. …
hi guyz... here's a pretty silly doubt that's been lingering fr a while.. why does the following code not work?? [CODE] func() { char *s; char a='x'; char b='y'; *s=a; s++; *s=b; cout<<s; } [/CODE] the program comes to halt inappropriately on running the above... can someone please explain the …
the prototype definitions that u have declared at the top are wrong as you are passing an array( but in ur case u are only passing a double variable here) so the prototypes must be.... void read_salary(double[] , int); int max_salary(double[], int); try running ur program now.... the errors must …
try to read all the information in a string.... and then typecast according to the desired datatype....
int fun(int(*)()); int main() { fun(main); cout<<"in main"<<endl; return 0; } fun(int (*p)()) { cout<<"in fun"<<endl; return 0; } the output is.... in fun in main how and in which manner is "main" being passed in the fun function argument in main function. does this way of passing automatically mean …
hi frndz... here's a very small doubt that's been lingering for a while... what is the meaning of finding an algorithm for a certain problem in constant space?? i dont understand the meaning of constant space, does it mean that no temporary variable can be created? for ex:here's a question... …
Hi frndz... here's my doubt.. if i pass a decimal or hexadecimal integer to a function from my main function..and then have to decide in that function whether the argument is a decimal or hexadecimal value..how shud i go bout it?? for ex: int main() { int count=2; int x[]={0x620058, …
thanx buddy... that was helpful... well i have one more doubt... the method you gave above is cool if i take input from stream... what if i pass a decimal or hexadecimal integer to a function from my main function..and then have to decide in that function whether the argument …
hi Guyz... need some help here... i want to input an integer but it can be either in hexadecimal form or in integer form. the problem is that i would like to store that input in that particular form and separate all hexadecimal values in to an array. for ex: …
hi Guyz... need some help here... i want to input an integer but it can be either in hexadecimal form or in integer form. the problem is that i would like to store that input in that particular form and separate all hexadecimal values in to an array. for ex: …
The End.
ayan2587