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?
Type: Posts; User: alice
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?
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...
Am I correct?
pls see the attachment, thk
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?
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....
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...
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.
...
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
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) /...
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...
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...
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...
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? :)
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.
sorry that I used void main ().
I will correct it in the future.
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...
My compiler give error "Declaration is not allowed here"
on the line ''int trimString(str);''
oh I forgot to remove ; after the function definition.
alloc 30 just for testing...it's doesnt matter the length.
I want to change the function prototype to
int trimString(char* str);
am my code correct? thk a lot.
can someone show me how to solve the question...
thk a lot..
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....
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;
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.
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 ...
hi,
many thank of your reply.