UMUC Asia - CMSC350 - Data Structures and Analysis
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
#contents
//** Biography
//
//My name is Yuji Shimojo and I'm 24. I'm from Okinawa, J...
//
//This class is required to obtain my B.S. in Computer Sc...
//
//I'm currently in charge of data center sales and web di...
//
//Actually, I used to study in Information Engineering at...
//
//My hobby is to play a lots of sports.
//
//I am using Eclipse Indigo on Mac OS X Snow Leopard (10....
** Week1 Topic1 [#g2a00865]
- Question
In addition to time complexity, there are several other f...
- Answer
For PCs, memory access speed is the most important, becau...
On the other hand, for servers, data input efficiency is ...
Of course, CPU is important as well, but I think CPU perf...
** Week1 Topic2 [#dc492a56]
- Question
Chapter 1 discusses 'Software Quality' related topics in ...
- Answer
From the aspect of "Software Quality" for business, you s...
** Homework1 [#k057f850]
- Description
Do the following Exercises in Lewis and Chase (pp 24-25)
-- EX 2.1
-- EX 2.2
-- EX 2.3
-- EX 2.4
-- EX 2.5
- Answer
#ref(CMSC350_Homework1.pdf)
** Week2 DQ1 [#a26711c2]
- Question
As listed under Course Content, I developed the following...
http://sites.google.com/site/jeyak7/inheritance1.swf (Par...
http://sites.google.com/site/jeyak7/inheritance2.swf (Par...
You can find the PowerPoint presentation and code in this...
http://sites.google.com/site/jeyak7/inheritance.zip
Give an example where polymorphism is appropriate, and ex...
You may find the following presentations helpful too - th...
http://sandsduchon.org/duchon/interfaces/InterfacesPart1....
http://sandsduchon.org/duchon/interfaces/InterfacesPart2....
http://sandsduchon.org/duchon/math/trees.html~
http://sandsduchon.org/duchon/jdk/Java-Exceptions.html
- Answer
Polymorphism is a mechanism in object-oriented programmin...
For example, if there are three classes named Shape, Rect...
Method overloading is one of the most important functions...
** Week2 DQ4 [#cef403c0]
- Question
Evaluate the following postfix expressions, then create o...
8 7 6 5 - - -~
8 7 - 6 5 - -~
8 7 - 6 - 5 -~
8 7 6 - - 5 -~
8 7 6 - 5 - -
- Answer
(1) 8 7 6 5 - - -~
= 8 7 1 - -~
= 8 6 -~
= 2
(2) 8 7 - 6 5 - -~
= 1 6 5 - -~
= 1 1 -~
= 0
(3) 8 7 - 6 - 5 -~
= 1 6 - 5 -~
= -5 5 -~
= -10
(4) 8 7 6 - - 5 -~
= 8 1 - 5 -~
= 7 5 -~
= 2
(5) 8 7 6 - 5 - -
= 8 1 5 - -
= 8 -4 -
= 12
Here is my own:~
3 4 + 6 2 - * 4 /~
= 7 6 2 - * 4 /~
= 7 4 * 4 /~
= 28 4 /~
= 7
** Project1 [#q2f9f88c]
- Description
Do Programming Project PP 3.7 on pg 67 of Lewis and Chase.
- Class Diagram
#ref(ClassDiagram(InfixToPostfixTranslator).png,,50%)
- GitHub Repository: https://github.com/yujishimojo/CMSC3...
-- InfixToPostfixTranslator.java
- Test Case
#ref(TestCase(InfixToPostfixTranslator).pdf)
** Week3 DQ1 [#ue310d00]
- Question
Describe an interesting application/analogy of the linked...
- Answer
LinkedList is suited for a FIFO (queue) data structure, b...
** Week3 DQ4 [#ye295ff8]
- Question
How does memory consumption vary between linked lists and...
- Answer
According to an article by Chris Bailey, Java Service Arc...
each its entry needs both value area and address area.
Incidentally, an array list reserves more memory area tha...
** Homework2 [#qf5d3b64]
- Description
Do the following Exercises in Lewis and Chase (pp 66 and ...
-- EX 3.4
-- EX 3.5
-- EX 4.1
-- EX 4.2
-- EX 4.4
-- EX 4.5
- Answer
#ref(CMSC350_Homework2.pdf)
** Week4 Topic1 [#of2b6dcc]
- Question
Describe a real-world scenario or an interesting applicat...
- Answer
An example of stack is Tetris game, which is one of the m...
** Project2 [#qb4e1ceb]
- Description
Do Programming Project PP 6.14 on pg 182 of Lewis and Cha...
-- You will want to ask questions to clarify the requirem...
-- You will want many test cases to make sure your progra...
-- I strongly suggest using a Spiral Development approach...
- Class Diagram
#ref(ClassDiagram(TestDoubleOrderedList).png,,50%)
- GitHub Repository: https://github.com/yujishimojo/CMSC3...
-- DoubleIterator.java
-- DoubleReverseIterator.java
-- DoubleNode
-- DoubleOrderedList.java
-- DoubleList.java
-- TestDoubleOrderedList.java
- Method Summary
#ref(MethodSummary(TestDoubleOrderedList).pdf)
** Week5 Topic1 [#i38577a1]
- Question
Describe an interesting application of recursion. Try to ...
- Answer
An example of a recursive function is DNS (Domain Name Sy...
** Week5 Topic4 [#ea6244f5]
- Question
Here is the equation to compute nth Fibonacci number fib(...
fib(n) = 1, if n = 1 or 2~
= fib(n-1) + fib(n-2) when n > 2
Implement a recursive solution based on this equation. Wh...
- Answer
Time complexity for recursive solution is (2^n) and for i...
public class FibonacciCalculator {
// Recursive solution
public int recurseFib(int n) {
if (n == 0) {
return 0;
} else if (n == 1) {
return 1;
} else {
return recurseFib(n-1) + recurseFib(n-2);
}
}
// Iterative solution
public int iterateFib(int n) {
int f0 = 0;
int f1 = 1;
int f2 = 1;
if (n == 0) {
return f0;
} else if (n == 1) {
return f1;
} else if (n ==2) {
return f2;
} else {
for(int i = 2; i < n; i++) {
f0 = f1;
f1 = f2;
f2 = f1 + f0;
}
}
return f2;
}
}
** Homework3 [#uade39c9]
- Description
Do ONE of the following Exercises in Lewis and Chase (pg ...
-- EX 7.8 or
-- EX 7.10
- Answer
#ref(TowersOfHanoi.pdf)
** Week6 Topic3 [#gf59f251]
- Question
Which sorting algorithm is the most useful one, when the ...
- Answer
I also agree with the idea that the insertion sort is the...
** Week6 Topic5 [#w1968441]
- Question
Quick Sort has the worst case time complexity of O(n2) wh...
- Answer
The reason why average time complexity of Quick Sort is O...
** Project3 [#kd91d8ad]
- Description
Do Programming Project PP 8.3 on pg 239 of Lewis and Chas...
-- You should test these algorithms on a variety of lists...
-- Try some small lists, some large lists. I suggest crea...
-- Document your experiments and results.
-- You will want to ask questions to clarify the requirem...
-- You will want many test cases to make sure your progra...
-- I strongly suggest using a Spiral Development approach...
- Class Diagram
#ref(ClassDiagram(SortingTest).png,,50%)
- GitHub Repository: https://github.com/yujishimojo/CMSC3...
-- SortingTest.java
- Test Case
#ref(SortingTestCases.pdf)
** Week7 DQ3 [#a973838b]
- Question
Given a specific node in binary search tree, how can you ...
- Answer
To find the immediate larger node in binary search tree, ...
** Week7 DQ5 [#x402f0b1]
- Question
Details of various operations in AVL trees and Red/Black ...
- Answer
In an AVL tree, height difference between the right child...
In a Red/Black tree, all the nodes are red or black. The ...
Both of the trees are self-balancing binary search trees,...
** Final Project [#h9be412f]
- Description
Do Programming Project PP 10.8 on pg 330 of Lewis and Cha...
-- Start with the attached code: BinarySearchTreeND.java
-- We will compare my implementation with the one in the ...
-- Test your code with many test cases confirming that th...
-- You will want to ask questions to clarify the requirem...
-- You will want many test cases to make sure your progra...
-- I strongly suggest using a Spiral Development approach...
- Class Diagram
#ref(ClassDiagram(BinarySearchTreeAVL).png,,50%)
- GitHub Repository: https://github.com/yujishimojo/CMSC3...
-- BinarySearchTreeAVL.java
- Test Case
#ref(TestCase(BinarySearchTreeAVL).pdf)
終了行:
#contents
//** Biography
//
//My name is Yuji Shimojo and I'm 24. I'm from Okinawa, J...
//
//This class is required to obtain my B.S. in Computer Sc...
//
//I'm currently in charge of data center sales and web di...
//
//Actually, I used to study in Information Engineering at...
//
//My hobby is to play a lots of sports.
//
//I am using Eclipse Indigo on Mac OS X Snow Leopard (10....
** Week1 Topic1 [#g2a00865]
- Question
In addition to time complexity, there are several other f...
- Answer
For PCs, memory access speed is the most important, becau...
On the other hand, for servers, data input efficiency is ...
Of course, CPU is important as well, but I think CPU perf...
** Week1 Topic2 [#dc492a56]
- Question
Chapter 1 discusses 'Software Quality' related topics in ...
- Answer
From the aspect of "Software Quality" for business, you s...
** Homework1 [#k057f850]
- Description
Do the following Exercises in Lewis and Chase (pp 24-25)
-- EX 2.1
-- EX 2.2
-- EX 2.3
-- EX 2.4
-- EX 2.5
- Answer
#ref(CMSC350_Homework1.pdf)
** Week2 DQ1 [#a26711c2]
- Question
As listed under Course Content, I developed the following...
http://sites.google.com/site/jeyak7/inheritance1.swf (Par...
http://sites.google.com/site/jeyak7/inheritance2.swf (Par...
You can find the PowerPoint presentation and code in this...
http://sites.google.com/site/jeyak7/inheritance.zip
Give an example where polymorphism is appropriate, and ex...
You may find the following presentations helpful too - th...
http://sandsduchon.org/duchon/interfaces/InterfacesPart1....
http://sandsduchon.org/duchon/interfaces/InterfacesPart2....
http://sandsduchon.org/duchon/math/trees.html~
http://sandsduchon.org/duchon/jdk/Java-Exceptions.html
- Answer
Polymorphism is a mechanism in object-oriented programmin...
For example, if there are three classes named Shape, Rect...
Method overloading is one of the most important functions...
** Week2 DQ4 [#cef403c0]
- Question
Evaluate the following postfix expressions, then create o...
8 7 6 5 - - -~
8 7 - 6 5 - -~
8 7 - 6 - 5 -~
8 7 6 - - 5 -~
8 7 6 - 5 - -
- Answer
(1) 8 7 6 5 - - -~
= 8 7 1 - -~
= 8 6 -~
= 2
(2) 8 7 - 6 5 - -~
= 1 6 5 - -~
= 1 1 -~
= 0
(3) 8 7 - 6 - 5 -~
= 1 6 - 5 -~
= -5 5 -~
= -10
(4) 8 7 6 - - 5 -~
= 8 1 - 5 -~
= 7 5 -~
= 2
(5) 8 7 6 - 5 - -
= 8 1 5 - -
= 8 -4 -
= 12
Here is my own:~
3 4 + 6 2 - * 4 /~
= 7 6 2 - * 4 /~
= 7 4 * 4 /~
= 28 4 /~
= 7
** Project1 [#q2f9f88c]
- Description
Do Programming Project PP 3.7 on pg 67 of Lewis and Chase.
- Class Diagram
#ref(ClassDiagram(InfixToPostfixTranslator).png,,50%)
- GitHub Repository: https://github.com/yujishimojo/CMSC3...
-- InfixToPostfixTranslator.java
- Test Case
#ref(TestCase(InfixToPostfixTranslator).pdf)
** Week3 DQ1 [#ue310d00]
- Question
Describe an interesting application/analogy of the linked...
- Answer
LinkedList is suited for a FIFO (queue) data structure, b...
** Week3 DQ4 [#ye295ff8]
- Question
How does memory consumption vary between linked lists and...
- Answer
According to an article by Chris Bailey, Java Service Arc...
each its entry needs both value area and address area.
Incidentally, an array list reserves more memory area tha...
** Homework2 [#qf5d3b64]
- Description
Do the following Exercises in Lewis and Chase (pp 66 and ...
-- EX 3.4
-- EX 3.5
-- EX 4.1
-- EX 4.2
-- EX 4.4
-- EX 4.5
- Answer
#ref(CMSC350_Homework2.pdf)
** Week4 Topic1 [#of2b6dcc]
- Question
Describe a real-world scenario or an interesting applicat...
- Answer
An example of stack is Tetris game, which is one of the m...
** Project2 [#qb4e1ceb]
- Description
Do Programming Project PP 6.14 on pg 182 of Lewis and Cha...
-- You will want to ask questions to clarify the requirem...
-- You will want many test cases to make sure your progra...
-- I strongly suggest using a Spiral Development approach...
- Class Diagram
#ref(ClassDiagram(TestDoubleOrderedList).png,,50%)
- GitHub Repository: https://github.com/yujishimojo/CMSC3...
-- DoubleIterator.java
-- DoubleReverseIterator.java
-- DoubleNode
-- DoubleOrderedList.java
-- DoubleList.java
-- TestDoubleOrderedList.java
- Method Summary
#ref(MethodSummary(TestDoubleOrderedList).pdf)
** Week5 Topic1 [#i38577a1]
- Question
Describe an interesting application of recursion. Try to ...
- Answer
An example of a recursive function is DNS (Domain Name Sy...
** Week5 Topic4 [#ea6244f5]
- Question
Here is the equation to compute nth Fibonacci number fib(...
fib(n) = 1, if n = 1 or 2~
= fib(n-1) + fib(n-2) when n > 2
Implement a recursive solution based on this equation. Wh...
- Answer
Time complexity for recursive solution is (2^n) and for i...
public class FibonacciCalculator {
// Recursive solution
public int recurseFib(int n) {
if (n == 0) {
return 0;
} else if (n == 1) {
return 1;
} else {
return recurseFib(n-1) + recurseFib(n-2);
}
}
// Iterative solution
public int iterateFib(int n) {
int f0 = 0;
int f1 = 1;
int f2 = 1;
if (n == 0) {
return f0;
} else if (n == 1) {
return f1;
} else if (n ==2) {
return f2;
} else {
for(int i = 2; i < n; i++) {
f0 = f1;
f1 = f2;
f2 = f1 + f0;
}
}
return f2;
}
}
** Homework3 [#uade39c9]
- Description
Do ONE of the following Exercises in Lewis and Chase (pg ...
-- EX 7.8 or
-- EX 7.10
- Answer
#ref(TowersOfHanoi.pdf)
** Week6 Topic3 [#gf59f251]
- Question
Which sorting algorithm is the most useful one, when the ...
- Answer
I also agree with the idea that the insertion sort is the...
** Week6 Topic5 [#w1968441]
- Question
Quick Sort has the worst case time complexity of O(n2) wh...
- Answer
The reason why average time complexity of Quick Sort is O...
** Project3 [#kd91d8ad]
- Description
Do Programming Project PP 8.3 on pg 239 of Lewis and Chas...
-- You should test these algorithms on a variety of lists...
-- Try some small lists, some large lists. I suggest crea...
-- Document your experiments and results.
-- You will want to ask questions to clarify the requirem...
-- You will want many test cases to make sure your progra...
-- I strongly suggest using a Spiral Development approach...
- Class Diagram
#ref(ClassDiagram(SortingTest).png,,50%)
- GitHub Repository: https://github.com/yujishimojo/CMSC3...
-- SortingTest.java
- Test Case
#ref(SortingTestCases.pdf)
** Week7 DQ3 [#a973838b]
- Question
Given a specific node in binary search tree, how can you ...
- Answer
To find the immediate larger node in binary search tree, ...
** Week7 DQ5 [#x402f0b1]
- Question
Details of various operations in AVL trees and Red/Black ...
- Answer
In an AVL tree, height difference between the right child...
In a Red/Black tree, all the nodes are red or black. The ...
Both of the trees are self-balancing binary search trees,...
** Final Project [#h9be412f]
- Description
Do Programming Project PP 10.8 on pg 330 of Lewis and Cha...
-- Start with the attached code: BinarySearchTreeND.java
-- We will compare my implementation with the one in the ...
-- Test your code with many test cases confirming that th...
-- You will want to ask questions to clarify the requirem...
-- You will want many test cases to make sure your progra...
-- I strongly suggest using a Spiral Development approach...
- Class Diagram
#ref(ClassDiagram(BinarySearchTreeAVL).png,,50%)
- GitHub Repository: https://github.com/yujishimojo/CMSC3...
-- BinarySearchTreeAVL.java
- Test Case
#ref(TestCase(BinarySearchTreeAVL).pdf)
ページ名: