Enter command edit
> edit hello.txt<Enter>
| # text editor is now open
add some text
| public class HeapSorter { | |
| private int[] items; | |
| private int heapSize; | |
| private final int ROOT = 0; | |
| public HeapSorter(int[] items) { | |
| this.items = items; | |
| this.heapSize = 0; | |
| } |
| import java.util.LinkedList; | |
| import java.util.List; | |
| public class HashTable<V> { | |
| private int capacity; | |
| private List<V>[] buckets; | |
| public HashTable(int capacity) { | |
| this.capacity = capacity; |
| import java.util.List; | |
| public class Graph { | |
| public void addNode(String src) { | |
| } | |
| public void addEdge(String src, String dst) { | |
| } |
| def factorial(n): | |
| """ | |
| Int -> Int | |
| Compute the factorial of n | |
| """ | |
| result = 1 | |
| for i in range(1, n + 1): | |
| result = result * i |
| #include <stdio.h> | |
| int str_len(char str[]) { | |
| int count = 0; | |
| for (int i = 0; str[i] != '\0'; i++) { | |
| count = count + 1; | |
| } | |
| return count; | |
| } |
| #include <stdio.h> | |
| int factorial(int n) { | |
| int result = 1; | |
| /* for i in range(1, n + 1): */ | |
| for (int i = 1; i < n + 1; i++) { | |
| result = result * i; | |
| } | |
| return result; | |
| } |
| class ReadArgs { | |
| public static void main(String[] args) { | |
| System.out.println(args.length); | |
| if (args.length >= 1) { | |
| System.out.println("Running commands in file: " + args[0]); | |
| } else { | |
| System.out.println("No args provided. Running in interactive mode"); | |
| } | |
| } | |
| } |
[email protected] (Use zip! Don't use other types of compression. WRONG: [email protected], [email protected])IMPORTANT: I'm using an auto-grader. If you do not follow these instructions precisely then the grader will fail on your code and you'll be given a 0 for this exercise
Folder structure for code + tests submission
[email protected] (Use zip! Don't use other types of compression. WRONG: [email protected], [email protected])IMPORTANT: I'm using an auto-grader. If you do not follow these instructions precisely then the grader will fail on your code and you'll be given a 0 for this exercise
Folder structure for tests submission (NOTE: different from code + tests folder structure)
[email protected]