Search Results - CodeGuru Forums
 CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: irpersian20

1. Thread: Which time complexity is true?

by irpersian20
Replies
6
Views
4,338

Re: Which time complexity is true?

Unfortunately, I don't understand it :(
I want know what the function time complexity ?

http://forums.codeguru.com/attachment.php?attachmentid=32665&d=1401537827

O(n) ?
O(nlogn)??
O(logn)???...
2. Thread: Which time complexity is true?

by irpersian20
Replies
6
Views
4,338

3. Thread: Which time complexity is true?

by irpersian20
Replies
6
Views
4,338

Which time complexity is true?

Hi,
Which time complexity is true?
O(n)
O(nlogn)
O(logn)
O(2^n/2)
32665

by irpersian20
Replies
0
Views
329

Why must be overloaded in pairs?

The comparison operators, if overloaded, must be overloaded in pairs; that is, if == is overloaded, != must also be overloaded. The reverse is also true, and similar for < and >, and for <= and >=.
...

by irpersian20
Replies
3
Views
2,811

Re: Calculator

123+321 = 123 !!

by irpersian20
Replies
3
Views
2,811

Calculator

Hi,
I want write a simple calculator without any priority but i have problem with this. :(

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using...

by irpersian20
Replies
4
Views
3,392

Re: Fill array

I can't write any code :( .. I need one idea for solve the problem.

by irpersian20
Replies
4
Views
3,392

Re: Fill array

Yes,I need help.
Please see the pdf file(attached) . i want fill array with the following pattern in pdf.

by irpersian20
Replies
4
Views
3,392

Fill array

Hi.
I want to solve the following exercises with four different arrays.
int[] a;
int[] b;
int[] c;
int[] d;
Thank you
10. Thread: Maximum of two consecutive elements

by irpersian20
Replies
11
Views
3,119

Re: Maximum of two consecutive elements

Dear my friend
It's not my homework.
Sample test questions , could not find an appropriate solution
11. Thread: Maximum of two consecutive elements

by irpersian20
Replies
11
Views
3,119

Re: Maximum of two consecutive elements

Use the divide-and-conquer approach to write a recursive algorithm that finds the maximum sum of two consecutive elements in an array.

For example:
1)3,7,1,6,9,2,3

6+9=15
Maximum of two...
12. Thread: Maximum of two consecutive elements

by irpersian20
Replies
11
Views
3,119

Re: Maximum of two consecutive elements

For example:
3,7,1,6,9,2,3

6+9=15
Maximum of two elements together
13. Thread: Maximum of two consecutive elements

by irpersian20
Replies
11
Views
3,119

Maximum of two consecutive elements

Hello,
What are your ideas to solve the following problem?

Divide and conquer method
Algorithm to find the two consecutive elements in an array of n elements is the sum of the maximum

by irpersian20
Replies
0
Views
1,425

Time complexity

Hello,
What is the time complexity T(n) of the nested loops below? For simplicity, you may assume that n is a power of 2. That is, n = 2k for some positive integer k.

:
for (i = 1; i...

by irpersian20
Replies
10
Views
1,365

Re: Heap

// input: an array of size n

isHeap(array h, index i) {

if(i > n/2) return true; //base case

if(h[i*2+1]!= null) {

if((h[i] >= h[i*2]) && (h[i] >= h[i*2+1]))

by irpersian20
Replies
5
Views
801

Re: Heap

Write an algorithm that determines whether or not an almost complete binary tree is a heap.

by irpersian20
Replies
5
Views
801

Re: Heap

ok,excuse me
but can you help me?

by irpersian20
Replies
10
Views
1,365

Heap

Hi,
Write an algorithm that determines whether or not an almost complete binary tree is a heap.

by irpersian20
Replies
5
Views
801

Heap

Hi,
Write that determines whether or not an almost complete binary tree is a heap.