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
# custom IntelliJ IDEA VM options | |
# from https://github.com/adben/config/blob/master/idea64.vmoptions | |
-ea | |
-server | |
-Xms2G | |
-Xmx4096M | |
-Xss16m | |
-XX:MaxMetaspaceSize=2G | |
-XX:MetaspaceSize=512m | |
-XX:ConcGCThreads=6 |
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
import java.io.File | |
import java.io.FileInputStream | |
import java.util.* | |
// Unique index for each Vertex | |
var currentIndex = 0 | |
class Vertex(private val index: Int = ++currentIndex) { | |
var terminate = false | |
val edges = mutableMapOf<Char, Vertex>() |
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
import java.io.BufferedWriter | |
import java.io.File | |
import java.io.FileInputStream | |
import java.util.* | |
import kotlin.test.assertTrue | |
const val FOLDER_PATH = "c:/data" | |
const val CHINESE_FILE_PATH = "$FOLDER_PATH/chinese.txt" | |
const val CHINESE_FILE_TEST_PATH = "$FOLDER_PATH/chinese_temp.txt" |
OlderNewer