Search:

Type: Posts; User: Delia

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Newton's Method for Systems of Nonlinear Equations

    I have to compute a solution for a System of Nonlinear Equations using Newton's Method.

    Does anybody have an idea how the algorithm may look like?
  2. Replies
    2
    Views
    783

    I don't know what programming language it is. I...

    I don't know what programming language it is. I found the solution here: Craig A. Rich--Programming Contests
  3. Replies
    2
    Views
    783

    Translation from another language

    I have a solution on the internet from my problem and I can't figure out how I can translate it in C (parts of it)

    for i in reverse 1..n-1 loop
    if d(e(i).u) = 1 or else d(e(i).v) =...
  4. Replies
    35
    Views
    7,164

    It's a question from my DSA exam: Suppose you...

    It's a question from my DSA exam: Suppose you have n integers in the range from 0 to n^2-1. Explain how to sort them in O(n) time.
  5. Replies
    35
    Views
    7,164

    Sorting in 0(n) time

    What algorithm should I use to sort n numbers between 0 - n^2-1 in O(n) time?
  6. Replies
    7
    Views
    2,050

    I took it step by step for i=1 first loop...

    I took it step by step
    for i=1
    first loop o(1), second o(n-1), third o(2)*o(2)*...*o(n) ---> that is o(n*n!)
    for i=2
    first loop o(1), second o(n-2), third o(3)*...*o(n)
    and so on

    for...
  7. Replies
    7
    Views
    2,050

    I''ve tried to calculate it... My answer was...

    I''ve tried to calculate it...
    My answer was O(n^2)
  8. Replies
    7
    Views
    2,050

    Complexity using big-Oh notation

    What is the worst case running time, in big-Oh notation, of the following program?




    int function(int n)
    {
    r=0;

    for (i=1; i<n; i++)
  9. It did clarify a lot. Thanks!

    It did clarify a lot. Thanks!
  10. That's not true... The fact that I ask means that...

    That's not true... The fact that I ask means that I'm interested. And no, they weren't properly explained at school. I bought 3 books written by my proffesor about Data structures and algorithms, so...
  11. What can I use as a hash function here?

    What can I use as a hash function here?
  12. But the isbn is unique for one book, a data can't...

    But the isbn is unique for one book, a data can't have two isbns. Or two data, the same isbn.

    Or what "hash the same thing/choose for the hash" means?
  13. Hash tables - open adressing for collision resolution

    I have up to 10,000 such data:


    typedef struct
    {
    char authors[5][40]; // first and last names of the author
    char title[50]; // title of the publication
    unsigned int year; // year of the...
  14. Replies
    6
    Views
    1,915

    working with void pointers

    I have the following functions :




    typedef struct
    {
    char authors[5][40]; // first and last names of the author
    char title[150]; // title of the publication
    unsigned int year; // year of...
  15. Thread: structures

    by Delia
    Replies
    5
    Views
    1,013

    Allocating memory. Thanks.

    Allocating memory. Thanks.
  16. Thread: structures

    by Delia
    Replies
    5
    Views
    1,013

    structures

    I have the following structure and I have to initialize the field authors with a null string.
    I get segmentation fault when I reach the second step
    strcpy(pItem->authors[1],"");



    ...
  17. Replies
    2
    Views
    1,238

    I'm geeting segmentation fault also if I use...

    I'm geeting segmentation fault also if I use this. "Cannot acces memory at adress ..."


    --- SOLVED ---
  18. Replies
    2
    Views
    1,238

    working with pointers to structures

    I have the next 2 structures:


    typedef struct
    {
    char authors[5][40]; // first and last names of the author
    char title[50]; // title of the publication
    unsigned int year; // year of the...
  19. Replies
    1
    Views
    1,464

    including header file

    I have include the header "SLList.h" into another heather "A1P01.h".

    I got the error: No such file or directory.
    Why?
    I've tried to copy the adress too and I got the same error.


    Solved.
  20. Replies
    6
    Views
    1,171

    The problem is that I don't know how many authors...

    The problem is that I don't know how many authors do I have,It can vary from 1-5. So I don't know how many times I have to use strok before entering the next area of fileds.
    eg.:


    "Knuth, Donald...
  21. Replies
    6
    Views
    1,171

    I don't know how to do it. I have a separation...

    I don't know how to do it. I have a separation area between the authors and the rest of the fields ",,,".
    I need some ideas how I can divide the fields.

    My idea was that I first use...
  22. Replies
    6
    Views
    1,171

    Reading from file

    I have as an assigment to create as a library the next structure:



    typedef struct
    {
    char authors[5][40]; // first and last names of the author
    char title[50]; // title of the publication...
  23. Replies
    19
    Views
    10,824

    It works. Thanks.

    It works. Thanks.
  24. Replies
    19
    Views
    10,824

    This is were I create my list ListDT...

    This is were I create my list



    ListDT *createDList()
    // returns a pointer to the header cell of the created list
    {

    ListDT *List=(ListDT*) malloc( sizeof (ListDT) );
    if (List != NULL)
  25. Replies
    19
    Views
    10,824

    typedef struct nodeD { void *Item; // pointer...

    typedef struct nodeD
    {
    void *Item; // pointer to satellite data
    struct nodeD *next; // pointer to next cell
    struct nodeD *prev; // pointer to previous cell
    } NodeDT; // type of cells on the...
Results 1 to 25 of 31
Page 1 of 2 1 2