An task in one of my homework questions has a phrasing that's throwing me for a bit of a loop. I wanted to try and confirm it here.

The description of task is: Given n open intervals (a1, b1), (a2, b2), . . . , (an, bn) on the real line, each representing start and end times of some activity requiring the same resource, the task is to find the largest number of these intervals so that no two of them overlap.

I made up the following example intervals to demonstrate my point

* A (2,4)

* B (5,6)

* C (7,9) (Part of an overlap with D and E)

* D (8,11) (Part of an overlap with C and E)

* E (10,13) (Part of an overlap with C and D)

* F (14,16)

* G (18,20)

* H (22,24)

* I (24,29)

My understanding of the phrasing is that a function made to do this task using the above points would return a value of 4 (representing the non-overlapping chain of F,G,H,I). Does this seem proper? ]]>

from reading A to B on one month is 25 pt./meter

from reading B to C on one month is 35pt./meter

First example if this is the first time to caculate the cost and reading is 45 KW, Category A starts from 0 and Category B starts from 50 then caculation will be as follows:

45 KW* 25 pt = 1,125 pt

Second example if this is the first time to caculate the cost and reading is 100 KW, Category A starts from 0 and Category B starts from 50 then caculation will be as follows:

50 KW* 25 pt + (100 KW-50 KW) * 35 pt = 3,000 pt

Third example if this is the second time to caculate the cost and reading is 150 KW, Category A starts from 0 and Category B starts from 50 and last reading of previouse month was 100 KW. then caculation will be as follows:

This month reading = 150-100 = 50 KW

50 KW* 25 pt =1,250 pt

So its simple. But what if Category A is chosen 50, and Category B is chosen 100. How would the calculation become? ]]>

I'd be grateful for any help I can get

Design a program that allows the user to enter two integer values, and displays every odd number that falls between these values. Assume that the second number is greater than the first number. ]]>

With this, I'm asking for your help to indicate whether this project is worth pursuing.

Please help comment on this and provide your thoughts.

http://www.algo.ninja ]]>

I am new to data structures and I have the following Java class:

Code:

`public final class Node<T>`

{

public final T v;

public Node<T> next;

public Node (T val, Node<T> link) {v = val; next = link}

}

I will be implementing Iterator<T> and Iterable<T> interfaces in order to use a "foreach" loop, that is why I need to know how to create a list of type Node<T>.

Respectfully,

Jorge Maldonado ]]>