initial upload
This commit is contained in:
26
2024/09/index.js
Normal file
26
2024/09/index.js
Normal file
@ -0,0 +1,26 @@
|
||||
let disk_map = "2333133121414131402"
|
||||
// 0..111....22222
|
||||
|
||||
//let fileArray = Array.from(file)
|
||||
|
||||
output = ""
|
||||
hints = ""
|
||||
//output += "".padStart(disk_map[0], 0)
|
||||
let id = -1
|
||||
let is_file = false
|
||||
for (let idx = 0; idx < disk_map.length; idx++) {
|
||||
let length = disk_map[idx]
|
||||
is_file = !is_file
|
||||
id = is_file ? id + 1 : id
|
||||
output += "".padStart(length, (is_file ? id : '.'))
|
||||
new_disk_map =
|
||||
}
|
||||
|
||||
function frag() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
console.log(disk_map)
|
||||
//console.log(hints)
|
||||
console.log(output)
|
Reference in New Issue
Block a user