mirror of
https://github.com/krahets/hello-algo.git
synced 2026-08-24 00:57:14 +00:00
feat(Kotlin): Replace value with _val (#1254)
* ci(kotlin): Add workflow file. * Update kotlin.yml * style(kotlin): value -> _val --------- Co-authored-by: Yudong Jin <krahets@163.com>
This commit is contained in:
@@ -32,10 +32,10 @@ class GraphAdjMat(vertices: IntArray, edges: Array<IntArray>) {
|
||||
}
|
||||
|
||||
/* 添加顶点 */
|
||||
fun addVertex(value: Int) {
|
||||
fun addVertex(_val: Int) {
|
||||
val n = size()
|
||||
// 向顶点列表中添加新顶点的值
|
||||
vertices.add(value)
|
||||
vertices.add(_val)
|
||||
// 在邻接矩阵中添加一行
|
||||
val newRow = mutableListOf<Int>()
|
||||
for (j in 0..<n) {
|
||||
|
||||
Reference in New Issue
Block a user