User Profile

Collapse

Profile Sidebar

Collapse
Rajesh V
Rajesh V
Last Activity: Dec 13 '09, 12:08 PM
Joined: Dec 18 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Rajesh V
    replied to RE to NFA
    in C
    Thank you, sir.
    I will look into it.

    Regards,
    Rajesh V.
    See more | Go to post

    Leave a comment:


  • Rajesh V
    started a topic RE to NFA
    in C

    RE to NFA

    Hello,
    I want to code the algorithm to convert a regular expression to NFA. I am aware of the algorithm for the problem. Please give me some ideas for writing an elegant code in C++.

    Thank you,
    Rajesh V
    See more | Go to post
    Last edited by Rajesh V; Jan 5 '09, 01:00 PM. Reason: grammar

  • Rajesh V
    replied to A Simple Debugging Guide
    in .NET
    Thanks for the nice article. Good encouragement for beginners like me who are afraid of bugs.
    there is no substitute for understanding what's going on.
    This is my most favourite line of the article.
    Thank you,
    Rajesh V.
    See more | Go to post

    Leave a comment:


  • Rajesh V
    started a topic k-element subsets
    in C

    k-element subsets

    Hi,
    The aim of this C++ code is to print all the k-element subsets of a set of size n. But somewhere it goes wrong - it doesn't print the answer properly. I tried a lot to find the mistake, but in vain. Please help me in debugging it and thanks in advance.

    Code:
    #include<iostream>
    #include<vector>
    using namespace std;
    
    int main()
    {
        printf( "Enter the number
    ...
    See more | Go to post

  • Rajesh V
    replied to Sudoku correctness checking
    in C
    Thank you for the counter example. But I think except the input with all the numbers 5, the sum checking should work. The sum checking should be done for all rows, columns, and 3x3 squares.

    Thanks again,
    Rajesh V...
    See more | Go to post

    Leave a comment:


  • Rajesh V
    replied to Sudoku correctness checking
    in C
    You can directly check according to the property of a sudoku. Have an array that counts the number of occurrences of each number( 1..9 ). You traverse all the rows. All the columns. And all the 3X3 squares too. For each row, column and a 3X3 sqaure seperately, see that the count value for all the numbers is exactly 1.

    I think the following logic might also work. Check whether the sum of all the elements in all rows is 45 and also the...
    See more | Go to post

    Leave a comment:


  • Rajesh V
    started a topic Array of vectors
    in C

    Array of vectors

    We can declare a vector of five 5-element vectors by


    Code:
    vector< vector<int> > v1( 5, vector<int> (5) );


    We can declare an array of five empty vectors by

    Code:
    vector<int> v2[5];

    But how can we declare an array of five 5-element vectors?
    See more | Go to post

  • Rajesh V
    started a topic Evaluation of arguments in function calls
    in C

    Evaluation of arguments in function calls

    Link to the question

    20. main()
    {
    int i=5;
    printf("%d%d%d% d%d%d",i++,i--,++i,--i,i);
    }

    The output is given as 45545. But I am getting 45555. Please clarify.

    In general how to resolve these kind of problems?
    See more | Go to post

  • Rajesh V
    started a topic Suggest a good book to learn C++
    in C

    Suggest a good book to learn C++

    Hello,

    Please suggest a good book to learn C++.

    Thank you,
    Rajesh V
    See more | Go to post

  • Why the GNU compiler gives the warning while using gets() ?

    When I use gets() function, the gcc compiler gives the warning - gets function is dangerous and should not be used. What is the problem in using it and how to avoid it ?
    See more | Go to post

  • Thanks for your reply.
    See more | Go to post

    Leave a comment:


  • Rajesh V
    started a topic Why Java codes take more run time than C/C++ ?
    in C

    Why Java codes take more run time than C/C++ ?

    Why Java codes take more run time than C/C++ ?
    See more | Go to post

  • Rajesh V
    replied to char* and char[]?
    in C
    In your post, you have said that

    Code:
    int array[][10];
    won't compile because we need to declare the number of elements.

    But, if i do like this,

    Code:
    int array[10][];
    The compiler gives the error - declaration of ‘a’ as multidimensiona l array must have bounds for all dimensions except the first

    Also, when i do like this,
    ...
    See more | Go to post

    Leave a comment:


  • Rajesh V
    replied to Basic Array Problem
    in C
    Why shouldn't we use arrays in C++?...
    See more | Go to post

    Leave a comment:


  • Rajesh V
    started a topic Usage of STL is to be made carefully

    Usage of STL is to be made carefully

    In C++, while using STL containers, you should think off the time complexity it takes. Don't think that usage of STL always increases the efficiency of your program. As an example, storing values in an array or hashing to an array takes very less time complexity when compared with a map when used instead. It is not that when we start coding in C++ ( that is when we are transformed from C to C++ ), we should replace the arrays by vectors.
    ...
    See more | Go to post
No activity results to display
Show More
Working...