Search:

Type: Posts; User: Jacopo

Search: Search took 0.01 seconds.

  1. Replies
    10
    Views
    7,478

    Pls, in terms of asymptotic function :( This is...

    Pls, in terms of asymptotic function :(
    This is really hard to understand for me!
    I guessed was (n^2) when the tree depth is same or more than 3, and (n) when the depth is less then 3
  2. Replies
    10
    Views
    7,478

    you are right, but my reasoning remains:D ...

    you are right, but my reasoning remains:D



    This is impressive. So it's correct to ignore the work of AddToTail? Maybe not.. then, how much is the complexity of FUNCTION2?
  3. Replies
    10
    Views
    7,478

    Because < 3 and > 3 are the cases where...

    Because < 3 and > 3 are the cases where "AddToHead" function doesn't run. So, it's like the code does a simply visit of tree, therefore its complexity is n, right?
    When, instead, the depth is = 3,...
  4. Replies
    10
    Views
    7,478

    Ok, thanks for your answer. Somebody else? :(

    Ok, thanks for your answer. Somebody else? :(
  5. Replies
    10
    Views
    7,478

    Asymptotic complexity help

    Hello guys,
    Which are the asymptotic complexity of this functions?


    Function(T) /* T is a Binary Search Tree */
    L.Head = NULL /* L is a new empty list of integers */
    ...
  6. Replies
    6
    Views
    1,988

    Thanks for all this replies. I'll must learn to...

    Thanks for all this replies. I'll must learn to use a debugger!
  7. Replies
    6
    Views
    1,988

    [x] and [y] are only two pointers that I use for...

    [x] and [y] are only two pointers that I use for scan the tree. I need the [y] pointer because when [x] exits from the while-loop it will be ever a sentinel node ( = null node) but I need instead the...
  8. Replies
    6
    Views
    1,988

    Help with RB BST

    Hello again!
    My hard work given me another big issue!
    So, I'm doing my Insert function for my red and black Binary Search Tree. My function is: ([n] is node to insert, [y] is pointer that points...
  9. Replies
    5
    Views
    7,114

    Did it! I will needed a lot of practice to...

    Did it! I will needed a lot of practice to understand completely this argument..
  10. Replies
    5
    Views
    7,114

    Ohhh I get it!:eek::eek: Thank you! At this...

    Ohhh I get it!:eek::eek: Thank you!

    At this point, I would like to know for what purposes (or into what Abstract Data Type) double pointers are most used.:o
  11. Replies
    5
    Views
    7,114

    Why I should be use double pointers?

    I understood that when the function changes the value of pointer (and not the value witch the pointer points..), we should be use a double pointer. This because the function works on a "copy" of...
  12. A week lost for this..Thank you so much...

    A week lost for this..Thank you so much sir!:rolleyes: I love this place!
  13. How to access a field of struct pointed by pointer pointed by pointer ecc...

    Hello guys, sorry for this horrible title. I have a big problem.
    I created my first personal Generic Singly Linked List. This is code (in italian Lista = List):


    typedef struct Node {
    void...
  14. Replies
    4
    Views
    3,872

    I'll do it! Thank you so much!

    I'll do it!
    Thank you so much!
  15. Replies
    4
    Views
    3,872

    mh, but the pointer "match" would be always NULL...

    mh, but the pointer "match" would be always NULL for each call of function, right? So for each call of Search the if condition will be always false and return will be always NULL as well..
    EDIT: Ok,...
  16. Replies
    4
    Views
    3,872

    Search function for binary tree

    Hi again guys,
    I'm back with another question, this time concerning tree structures.
    My tree is a binary tree and the nodes are struct as follows:


    struct Node {
    int info;
    struct Node...
  17. Replies
    8
    Views
    6,044

    Yeah I was writing this right now! :D Thanks to...

    Yeah I was writing this right now! :D
    Thanks to all!

    So, this code works but my last doubt...is this the best way to initialize an struct (or this type of struct)?


    #include <stdio.h>#include...
  18. Replies
    8
    Views
    6,044

    Ok, I have tried to rewrite my code with the...

    Ok, I have tried to rewrite my code with the malloc function but the result not change..Where am I doing wrong?

    #include <stdio.h>#include <stdlib.h>


    struct Element {
    int info;
    ...
  19. Replies
    8
    Views
    6,044

    mh, can you show me an example? How?...

    mh, can you show me an example?


    How? :confused:
  20. Replies
    8
    Views
    6,044

    Thanks for reply me. I'm able to use malloc...

    Thanks for reply me.
    I'm able to use malloc function to make dynamic array, but how can I use malloc to initialize struct?
  21. Replies
    8
    Views
    6,044

    Help for my code

    Hello everyone,
    I'm new entry here, my name is Jacopo, from Italy.
    I'm trying study c language and I have write a code to make a list but now I need some help for this.
    So, this is not exactly my...
Results 1 to 21 of 22