Search:

Type: Posts; User: Debojyoti Das

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    69
    Views
    8,712

    Will try to do the same.

    Will try to do the same.
  2. Replies
    69
    Views
    8,712

    Sorry for being late, here's the solution that I...

    Sorry for being late, here's the solution that I did, don't know how efficient it is...



    #include <stdio.h>#include <stdlib.h>
    size_t read_numbers(int numbers[], int max_size)
    {
    size_t i...
  3. Replies
    69
    Views
    8,712

    Sorry for my so less experience in coding, but I...

    Sorry for my so less experience in coding, but I have never seen a while loop number reading like this. Can you please explain the logic so that I can implement loops like this myself? The...
  4. Replies
    69
    Views
    8,712

    #include #include #define...

    #include <stdio.h>#include <stdlib.h>
    #define MAXVALUE 10
    int compact (int[], int);
    int main()
    {
    int arrSeries[MAXVALUE], i=0, newArrayLength;
    int arrLength = MAXVALUE;
    printf("Please enter...
  5. Replies
    69
    Views
    8,712

    Whoa..now I recognize it. Thanks for the take :) .

    Whoa..now I recognize it. Thanks for the take :) .
  6. Replies
    69
    Views
    8,712

    Just to do replace the garbage values I guess....

    Just to do replace the garbage values I guess. And in my version of the code I get the reduced range based on my lastVal thingy. I do recognize that other workarounds are possible and I will try...
  7. Replies
    69
    Views
    8,712

    It surely does :) ! Thanks :) .

    It surely does :) ! Thanks :) .
  8. Replies
    69
    Views
    8,712

    Not exactly divide and conquer but my approach...

    Not exactly divide and conquer but my approach will be to divide the partition into repeating sets and then put one instance for the same and keep the non-repeating sets as is. I think it might be...
  9. Replies
    69
    Views
    8,712

    Out of bounds :(. Silly me.

    Out of bounds :(. Silly me.
  10. Replies
    69
    Views
    8,712

    Edited. Returns correct results for me :). Added...

    Edited. Returns correct results for me :). Added a newline character as well :) .



    #include <stdio.h>#include <stdlib.h>
    #define MAXVALUE 10
    int compact (int[], int);
    int main()
    {
    int...
  11. Replies
    69
    Views
    8,712

    Wow ! I will change and try to fix the bug :) . ...

    Wow ! I will change and try to fix the bug :) .

    EDIT: You missed a semicolon there :) .
  12. Replies
    69
    Views
    8,712

    An in-place solution would surely reduce space...

    An in-place solution would surely reduce space complexity and as this would be a divide and conquer method, time complexity may improve. A good proposition indeed.Working out now :) .
  13. Replies
    69
    Views
    8,712

    Here's the final code: #include ...

    Here's the final code:



    #include <stdio.h>
    #include <stdlib.h>
    #define MAXVALUE 10
    int compact (int[], int);
    int main()
    {
  14. Replies
    69
    Views
    8,712

    True the actual question doesn't want me to print...

    True the actual question doesn't want me to print the compact array but just for my programming practice I took on the (ARGH! :)) task :D. Thanks for the heads up on C++, I am yet to learn that :( ....
  15. Replies
    69
    Views
    8,712

    Well a new train of thought came to me. Why not I...

    Well a new train of thought came to me. Why not I just remember the last digit in the array of number the user inputs, fill the array say (last digit+1) and during result output truncate all digits...
  16. Replies
    69
    Views
    8,712

    That's a great idea ! Atleast the user won't need...

    That's a great idea ! Atleast the user won't need to see zeroes and garbage values :) . Thanks.
  17. Replies
    69
    Views
    8,712

    Thanks :) . Maybe I will prompt user not to enter...

    Thanks :) . Maybe I will prompt user not to enter 0's :D .
  18. Replies
    69
    Views
    8,712

    Yes j has the same value, thank you for making me...

    Yes j has the same value, thank you for making me notice :) . Changed the code and also added data acceptance from user:



    #include <stdio.h>#include <stdlib.h>
    #define MAXVALUE 10
    void...
  19. Replies
    69
    Views
    8,712

    #include #include void...

    #include <stdio.h>#include <stdlib.h>
    void compact (int[], int);
    int main()
    {
    int arrSeries[11] = {1, 1, 1, 2, 2, 1, 2, 3, 3, 1, 1 };
    int arrLength = 11;
    compact(arrSeries,...
  20. Replies
    69
    Views
    8,712

    It got deleted for reasons I don't know :( ...

    It got deleted for reasons I don't know :(



    Well it's the number of steps my first and second piece of code does for similar set of numbers. In fact the second piece of code was provided a...
  21. Replies
    69
    Views
    8,712

    while(l

    while(l<MAXSIZE) {
    i=0, j=0;
    while(i < MAXSIZE)
    {
    if(changeArray[i]==changeArray[i+1])
    {
    j=i;
    while(j < MAXSIZE)
    {
    changeArray[j]=changeArray[j+1];
  22. Replies
    69
    Views
    8,712

    Why did they keep v and b adjacently on the...

    Why did they keep v and b adjacently on the keyboard ;) ??
  23. Replies
    69
    Views
    8,712

    You are recommending me to find out it's time...

    You are recommending me to find out it's time complexity. Sure thing doing it now :) .
  24. Replies
    69
    Views
    8,712

    Here's my solution (it work's :) ) but it became...

    Here's my solution (it work's :) ) but it became quite complex and due to the shifting the garbage value also shows.
    Now will think on R.Stiltskin's idea.


    #include <stdio.h>#include <stdlib.h>...
  25. Replies
    69
    Views
    8,712

    Thanks ! Working on it !

    Thanks ! Working on it !
Results 1 to 25 of 31
Page 1 of 2 1 2