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

Search:

Type: Posts; User: irpersian20

Search: Search took 0.03 seconds.

  1. Replies
    6
    Views
    5,671

    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. Replies
    6
    Views
    5,671

    Re: Which time complexity is true?

    Please help me
  3. Replies
    6
    Views
    5,671

    Which time complexity is true?

    Hi,
    Which time complexity is true?
    O(n)
    O(nlogn)
    O(logn)
    O(2^n/2)
    32665
  4. Replies
    0
    Views
    665

    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 >=.
    ...
  5. Thread: Calculator

    by irpersian20
    Replies
    3
    Views
    3,305

    Re: Calculator

    123+321 = 123 !!
  6. Thread: Calculator

    by irpersian20
    Replies
    3
    Views
    3,305

    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...
  7. Thread: Fill array

    by irpersian20
    Replies
    4
    Views
    4,074

    Re: Fill array

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

    by irpersian20
    Replies
    4
    Views
    4,074

    Re: Fill array

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

    by irpersian20
    Replies
    4
    Views
    4,074

    Fill array

    Hi.
    I want to solve the following exercises with four different arrays.
    int[] a;
    int[] b;
    int[] c;
    int[] d;
    Please see the pdf file.
    Thank you
  10. Replies
    11
    Views
    4,953

    Re: Maximum of two consecutive elements

    Dear my friend
    It's not my homework.
    Sample test questions , could not find an appropriate solution
  11. Replies
    11
    Views
    4,953

    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. Replies
    11
    Views
    4,953

    Re: Maximum of two consecutive elements

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

    6+9=15
    Maximum of two elements together
  13. Replies
    11
    Views
    4,953

    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
  14. Replies
    0
    Views
    3,589

    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...
  15. Thread: Heap

    by irpersian20
    Replies
    10
    Views
    1,774

    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]))
  16. Thread: Heap

    by irpersian20
    Replies
    5
    Views
    1,017

    Re: Heap

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

    by irpersian20
    Replies
    5
    Views
    1,017

    Re: Heap

    ok,excuse me
    but can you help me?
  18. Thread: Heap

    by irpersian20
    Replies
    10
    Views
    1,774

    Heap

    Hi,
    Write an algorithm that determines whether or not an almost complete binary tree is a heap.
    Please
  19. Thread: Heap

    by irpersian20
    Replies
    5
    Views
    1,017

    Heap

    Hi,
    Write that determines whether or not an almost complete binary tree is a heap.
    Please
Results 1 to 19 of 19





Click Here to Expand Forum to Full Width

Featured