Home
Search For Notes
All Search Criteria Are Optional
After:Before:
In Course:
Contains String:
0 1 2 3 4 5 6 7 8
Date tag: February 23 2010 6:36:23
Click here to add notes.
Date tag: February 23 2010 6:4:12
Click here to add notes.
Date tag: February 23 2010 6:3:25
Click here to add notes.
Date tag: February 23 2010 6:3:8
Click here to add notes.
Date tag: February 23 2010 5:33:49
Click here to add notes.
Date tag: February 23 2010 5:33:22
Click here to add notes.
Date tag: February 23 2010 5:26:56
Click here to add notes.
Date tag: February 23 2010 5:26:2
Click here to add notes.
Date tag: February 23 2010 5:22:53
Click here to add notes.
Date tag: February 23 2010 5:20:26
Click here to add notes.
Date tag: February 23 2010 5:17:35
Click here to add notes.
Date tag: February 23 2010 5:11:44
Click here to add notes.
Date tag: February 11 2010 6:19:13
Then the universe changed when in the 1970s Bell labs developed C and UNIX at around the same time. C is very simple and very powerful but there is no support for high level abstractions by the programmer. It is also easy to make hard to find bugs.
Date tag: February 11 2010 6:15:51
A brief history of programming languages: In the 1940s to 1950s Programming was done directly in machine language, and later in assembly languages. In the 1950s the first high level languages appeared, such as fortran lisp or cobol. In the 1960s the first elegant languages like pascal or turing were developed.
Date tag: February 11 2010 6:11:1
If we use a queue like implementation when insertions are O 1 then step b is O 1 so enterpq is O k. This is a big win if k is much less than N. But what about leavePQ, in this case. For step a it is O 1. For step b it is O n divided by k, which approached O N if k is much less than N.
Date tag: February 11 2010 6:3:6
Click here to add notes.
Date tag: February 11 2010 6:0:12
Click here to add notes.
Date tag: February 11 2010 5:48:37
Click here to add notes.
Date tag: February 11 2010 5:48:26
Click here to add notes.
Date tag: February 11 2010 5:43:26
ls is a list of pairs of the form val piror where prior is a postive int define struct pq ls pre: q is a PQ, prior is positive int define enterPQ prior val q cond isEmptyPQ q make pq list list val prior prior second first pq ls q make pq cons list val prior pq ls q else make pq cons first pq ls q pq ls enterPQ prior val make pq rest pq ls q q is a non empty PQ define leavePQ q make pq rest pq ls q q is a non empty PQ define first q first first pq ls q
Date tag: February 11 2010 5:21:35
Click here to add notes.
Date tag: February 11 2010 5:17:42
Click here to add notes.
Date tag: February 11 2010 5:8:6
Priority Queue: The idea is that each element has a value plus a priority, which is a positive int. The removal policy is to grab the oldest element that has the lowest, or highest priority. If all elements have the same priority, this is just a normal queue.
Date tag: February 11 2010 5:7:46
ADTs: Data containers with well defined operations for their manipulation. Stacks are a LIFO list. Queues are a FIFO list. For ADT clients random access to elements is not permitted in general. For example changing stack contents is only allowed by calls to push, pop etc, not cons, rest etc.
Date tag: February 9 2010 6:7:38
Click here to add notes.
Date tag: February 9 2010 6:4:31
Click here to add notes.
Date tag: February 9 2010 5:59:5
Click here to add notes.
Date tag: February 9 2010 5:56:6
Click here to add notes.
Date tag: February 9 2010 5:52:31
Click here to add notes.
Date tag: February 9 2010 5:48:14
Click here to add notes.
Date tag: February 9 2010 5:43:7
Click here to add notes.
Date tag: February 9 2010 5:36:54
Click here to add notes.
Date tag: February 9 2010 5:30:5
Click here to add notes.
Date tag: February 9 2010 5:29:55
Scheme queue
Date tag: February 9 2010 5:17:3
Click here to add notes.
Date tag: February 9 2010 5:12:12
Click here to add notes.
Date tag: February 4 2010 6:21:29
Click here to add notes.
Date tag: February 4 2010 6:17:40
A queue is a data container that enforces a FIFO policy on adding or removing elements.
Date tag: February 4 2010 6:11:6
The complexity of all operations in this particular implementation is O 1
Date tag: February 4 2010 6:7:23
Click here to add notes.
Date tag: February 4 2010 6:3:59
Click here to add notes.
Date tag: February 4 2010 6:1:18
Click here to add notes.
Date tag: February 4 2010 5:54:49
Click here to add notes.
Date tag: February 4 2010 5:54:39
Click here to add notes.
Date tag: February 4 2010 5:46:9
Click here to add notes.
Date tag: February 4 2010 5:41:45
Click here to add notes.
Date tag: February 4 2010 5:36:14
Top, aka peek, takes a non empty stack and returns but doesn t remove the top element. ie the most recently added element that hasn t been removed. IsEmptySTK takes a stack and returns true iff the stack has no elements.
Date tag: February 4 2010 5:36:4
Make stack creates and returns a new stack for a given list, often the empty list. Push takes a stack and a new element and returns a stack that is the same as the original, except for adding the element on the top. Pop takes a stack, that is non empty, and returns a stack that is the same as the original except that the top element is removed.
Date tag: February 4 2010 5:29:44
Date tag: February 4 2010 5:23:19
A stack is a data container that enforces a LIFO policy on insertion or deletion. Operations are makestack, push, pop, top, isEmpty, size.
0 1 2 3 4 5 6 7 8