Search:

Type: Posts; User: alice

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    8
    Views
    2,699

    for the third '5 n lg n + 4 n' since...

    for the third '5 n lg n + 4 n'

    since nlgn<n2<n3

    f(n)=5 n lg n + 4 n < 5(n3)+4n
    =19n

    am I correct?
  2. Replies
    1
    Views
    11,969

    Character stack ADT program

    how can I write a program, using ADT that process a text strings,



    void push(char ch); // pushes the character ch onto the stack;

    char pop(); // pops and returns the top character;

    int...
  3. Replies
    2
    Views
    1,835

    Am I correct? pls see the attachment, thk

    Am I correct?
    pls see the attachment, thk
  4. Replies
    2
    Views
    1,835

    Delete a node in a binary tree

    What the result will be if

    9,
    2,
    5

    is delete in the binary tree? (pls see the attach)

    for the case 5, will 6 be the upper node?
  5. Replies
    2
    Views
    2,118

    Reserve the character in a string

    How can I use ADT to complete a function takes in a string
    parameter (char array) that contains one or more sentences;
    each sentence is terminated by the full-stop ('.') or the
    NULL character....
  6. thk everyone, anything should i need to change...

    thk everyone,

    anything should i need to change if using another function,



    char* recursiveStrchr(char str[], char ch);


    this function return the point to the first occurrence of char ch...
  7. Recursive function to convert uppercase to lowercase

    I am writing a functions to convert all uppercase letter in the str parameter str into lowercase.
    Below is my program,is there any mistake and can someone point out my wrong? thk.


    ...
  8. Replies
    8
    Views
    2,699

    Using big-O notation

    How can I re-express the below thress functions of algorithm complexity using the big-O notation?

    12
    2n^2 + 3 n
    5 n lg n + 4 n
  9. Replies
    7
    Views
    8,055

    then what is Worst case unsorted...

    then what is
    Worst case unsorted two-dimensional array of size N with linear search &
    Best case unsorted two -dimensional array of size N with linear search?

    I think the first one is log(NxN) /...
  10. Replies
    7
    Views
    8,055

    no. of comparisons in linear/binary search

    hi, what is the no. of comparison in a worst case unsorted one-dimensional array of size N with linear search?

    is it 'N'?

    and if worst case sorted one-dimensional array of size N with binary...
  11. Thread: Order or tree

    by alice
    Replies
    1
    Views
    1,072

    Order of tree

    Please see the diag. inside the attach file, Am I correct of the different order below?

    In-order 1,2,3,4,5,6,7,8,9 (just sorting the number?)

    Pre-order 5,2,1,4,3,6,7,8,9

    Post-order...
  12. Replies
    6
    Views
    1,053

    book record function

    how does write a function that creates a new node for a linked list of book records.

    Suppose the function name is:


    struct bookRecord* createNode(char* title, char isbn[16], int year);

    The...
  13. Thread: Use of variable

    by alice
    Replies
    8
    Views
    2,600

    I only want to know, ie, for the statement...

    I only want to know, ie,

    for the statement sum+=variableB;,

    the variable sum is defined at the

    statement int sum=0;,

    is it correct? :)
  14. Thread: Use of variable

    by alice
    Replies
    8
    Views
    2,600

    what is __LINE__ mean in the printf statement?...

    what is __LINE__ mean in the printf statement?
    the number 01,02,03.... start at left side indicted the line number.
    it is remove while compiling in C.
  15. Thread: Use of variable

    by alice
    Replies
    8
    Views
    2,600

    sorry that I used void main (). I will correct...

    sorry that I used void main ().
    I will correct it in the future.
  16. Thread: Use of variable

    by alice
    Replies
    8
    Views
    2,600

    Use of variable

    can someone help me to verify the following variable is come from which line (in the below program):

    ie. paramB used on line 39 is defined on line 35.

    -The variable variableA on line 10 =34...
  17. Replies
    37
    Views
    9,119

    My compiler give error "Declaration is not...

    My compiler give error "Declaration is not allowed here"
    on the line ''int trimString(str);''
  18. Replies
    37
    Views
    9,119

    oh I forgot to remove ; after the function...

    oh I forgot to remove ; after the function definition.
    alloc 30 just for testing...it's doesnt matter the length.
  19. Replies
    37
    Views
    9,119

    I want to change the function prototype to ...

    I want to change the function prototype to



    int trimString(char* str);



    am my code correct? thk a lot.
  20. Replies
    4
    Views
    1,688

    can someone show me how to solve the question......

    can someone show me how to solve the question...
    thk a lot..
  21. Replies
    4
    Views
    1,688

    A challenge program

    Any expert can do this difficult question?

    You have joined a small software company as a junior programmer. The company mainly takes in software development jobs for small and medium enterprises....
  22. Replies
    37
    Views
    9,119

    I am glad to see that many expert replying my...

    I am glad to see that many expert replying my question,
    Can someone explain the code from Kip,



    while (isspace((unsigned char)*end)) {
    --end;
    }
    *++end = '\0';
    p = mem;
  23. Replies
    37
    Views
    9,119

    for the example 1 & 2, the character can be in...

    for the example 1 & 2, the character can be in any char, ie a-z or A to Z or 1-9..
    it is only remove the leading and trailing space.

    thank.
  24. Replies
    37
    Views
    9,119

    Remove space in a string

    how can I write a program which convert a given string, it removing the leading and trailing space?


    Example 1: (Let . be space)

    ......ABCD....EDE....2dkjl......kll##....

    Result should be ...
  25. Replies
    8
    Views
    2,228

    hi, many thank of your reply.

    hi,

    many thank of your reply.
Results 1 to 25 of 36
Page 1 of 2 1 2