View intern.c
#include <limits.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
const char * | |
intern(const char *s) | |
{ | |
union tree { | |
const char *str; |
View CovariantIterator.java
import java.util.Iterator; | |
public class CovariantIterator<T extends U, U> implements Iterator<U> | |
{ | |
private Iterator<T> iter; | |
public CovariantIterator(Iterator<T> it) | |
{ | |
this.iter = it; | |
} |
View roman.c
#include <stdio.h> | |
enum { I, V, X, L, C, D, M, StackSize }; | |
const int values[] = { 1, 5, 10, 50, 100, 500, 1000 }; | |
int | |
unroman(const char *s) | |
{ | |
int stack[StackSize]; |
NewerOlder