3
实施简化字距调整
介绍 字距调整是指调整文本字母之间的间距。例如,考虑Top用以下三个字形写的单词: ##### ..... ..... ..#.. ..... ..... ..#.. ..##. .###. ..#.. .#..# .#..# ..#.. .#..# .#..# ..#.. ..##. .###. ..... ..... .#... ..... ..... .#... 我们可以用点填充字形之间的间隙并完成它,但是间隙看起来太宽了。相反,我们将字形滑动到左侧,以便它们几乎可以接触: #####........ ..#.......... ..#..##..###. ..#.#..#.#..# ..#.#..#.#..# ..#..##..###. .........#... .........#... 看起来好多了!请注意,的条形图T在的左边框上方o。在此挑战中,您的任务是为此类矩形字形实现一个简单的字距调整程序。 字距调整过程 考虑具有.和#形状相同的两个矩形2D字符数组。在简单的字距调整过程中,我们首先将数组并排放置,中间放置一列.s。然后,我们将#右阵列中的每一个向左移动一步,直到#左右阵列中的s正交或对角相邻。字距调整的结果是引入相邻s 之前的步骤#。您的任务是实施此过程。 让我们举个例子: Inputs: ..### #.... #.... ..##. ...#. ...## ..### ....# Process: …
24
code-golf
grid
code-challenge
atomic-code-golf
code-golf
combinatorics
probability-theory
card-games
code-golf
number
geometry
code-golf
decision-problem
chess
code-golf
math
number
sequence
code-golf
string
regular-expression
code-golf
arithmetic
integer
code-golf
math
array-manipulation
code-golf
number
decision-problem
integer
code-golf
string
ascii-art
kolmogorov-complexity
code-golf
decision-problem
graph-theory
binary-matrix
code-golf
string
parsing
code-golf
string
code-golf
morse
code-golf
code-golf
string
code-golf
ascii-art
cellular-automata
code-golf
binary
base-conversion
code-golf
arithmetic
decision-problem
integer
checksum
code-golf
matrix
linear-algebra
code-golf
code-golf
game
code-golf
sequence
binary
code-golf
combinatorics
optimization
code-golf
decision-problem
quine
code-golf
rational-numbers
bitwise
code-golf
string
permutations
code-golf
kolmogorov-complexity
unicode
code-golf
ascii-art
number
code-golf
number
integer
binary
base-conversion
code-golf
array-manipulation
code-golf
chemistry
code-golf
number
sequence
fibonacci
code-golf
matrix
optimization
code-golf
number
code-golf
math
number
sequence
code-golf
math
array-manipulation
matrix
linear-algebra
code-golf
kolmogorov-complexity
cops-and-robbers
cops-and-robbers
code-golf
tips
basic
code-golf
decision-problem
binary
tiling
game
king-of-the-hill
python
code-golf
c
code-golf
ascii-art
code-golf
string
kolmogorov-complexity
alphabet
code-golf
number
code-golf
string
code-golf
number
sequence
integer
code-golf
number
permutations
restricted-complexity
restricted-time