Search:

Type: Posts; User: custurd122000

Search: Search took 0.08 seconds.

  1. Replies
    3
    Views
    1,166

    Re: Adjacency list graph

    Yes here's the output:


    The order of the graph = 6
    The size of graph = 14
    Graph:
    Index 0: 0,2
    Index 1: 0,4
    Index 2: 1,4
    Index 3: 1,5
  2. Replies
    3
    Views
    1,166

    Adjacency list graph

    I'm trying to read a text file of a graph and print information about the graph including the order and size of the graph, rather it is a directed or undirected graph, if it is directed the in and...
  3. Replies
    1
    Views
    2,717

    In degree and out degree of a graph

    I have this code for reading a text file and printing out information about the graph, the program works perfectly but I need to figure out the in degree and out degree of the graph if it is an...
  4. Re: Double Hashing for inserting integer into hashtable

    Oh okay I see, so how would I call my insert method?
  5. Double Hashing for inserting integer into hashtable

    I'm having a problem implementing double hashing when I insert a value into the table i get this for the output:
    Insert []. Is there something I'm doing wrong? I'm not getting any errors




    ...
  6. Re: MaxSum algorithm with negative values in Array

    You were right, i inputted the algorithm incorrectly...now the data file in case 2 is still posting incorrectly, heres the updated algorithm


    {
    public static int maxSum(int[] a, int n)
    ...
  7. Re: MaxSum algorithm with negative values in Array

    I'm not supposed to change that algorithm, I can only change the case statements that call upon it
  8. Re: MaxSum algorithm with negative values in Array

    No you were correct it should be 1 but its printing out 7, the code just prints out the sum you had the correct idea but when adding negatives it warps the result into a strange result
  9. Re: MaxSum algorithm with negative values in Array

    In theory yes it should but the result of that is actually 7??? I have no clue where the numbers are coming from but
    1,2,3,4,5,6 prints out 21
  10. Re: MaxSum algorithm with negative values in Array

    The maxSum is given the problem is the implementation of it but what it is is basically an algorithm that prints out the sum of the
    integer array. It works as is but it won't let me input negative...
  11. MaxSum algorithm with negative values in Array

    How would I go about inputting the negative values in the array in case 1 the array comes from the user, case 2 from the text file?
    The sum prints perfectly fine with positive values but if I input...
  12. Implement a separate-chaining hashtable from scratch

    I need to implement a separate-chaining hash table from scratch and I don't need to know the code or anything
    I would just like an explanation of how I would go about doing the algorithm for this...
Results 1 to 12 of 12