This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package edu.cmu.cs771.hw1; | |
/** | |
* This class implements a doubly linked list of characters in Java. | |
* The instance variables head and tail are initially null. | |
* As elements are added head points to the first element on the list and tail points to the last element. Each node on the list is of type DoubleNode. | |
* Each DoubleNode holds a pointer to the previous node and a pointer to the next node in the list. | |
* @author songluo | |
* | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main() { | |
Map<String, int> map = { | |
'one': 1, | |
'two': 2, | |
'twelve': 12}; | |
void iterateMapEntry(key, value) { | |
map[key] = value; | |
print('$key:$value');//string interpolation in action | |
} |
NewerOlder