Skip to main content
added 324 characters in body
Source Link

Test for empty grid

+--------+ | | | | | | | | | | | | | | | | +--------+ +--------+ | | | | | | | | | | | | | | | | +--------+ 

Test for empty grid

+--------+ | | | | | | | | | | | | | | | | +--------+ +--------+ | | | | | | | | | | | | | | | | +--------+ 
added 187 characters in body
Source Link

Your task is to create a function or a program that can take in a String of a grid lines separated by \n and outputs grid lines separated by \n (optionally including a trailing newline). The output should have lines extended as described byWhen there is a \ or a /, your program must add slashes diagonally until you reach both ends so that the introductionslashes look like a line. Whenever two lines intersect, you must replace them with X. If given an X, you must extend in both diagonal directions. You can assume that no lines have already be extended. and you can assume the border is intact. Standard I/O format applies.

+--------+ | X | | X | | | | | | | | X | | | | | +--------+ \---X-/--+ |\\\ / X | | X|\X / \ / |/ X\X \/| / / \\\ /\| |/  \\\/ \ / X\ | | /  \\\ | | /  \|\\| +-/------\\\ 

Your task is to create a function or a program that can take in a String of a grid lines separated by \n and outputs grid lines separated by \n (optionally including a trailing newline). The output should have lines extended as described by the introduction. You can assume that no lines have already be extended. and you can assume the border is intact. Standard I/O format applies.

+--------+ | X | | X | | | | | | | | X | | | | | +--------+ \---X-/--+ |\ / X | | X / \ / |/ X \/| / / \ /\| |/  \/ \ / X\ | | /  \ | | /  \| +-/------\ 

Your task is to create a function or a program that can take in a String of a grid lines separated by \n and outputs grid lines separated by \n (optionally including a trailing newline). When there is a \ or a /, your program must add slashes diagonally until you reach both ends so that the slashes look like a line. Whenever two lines intersect, you must replace them with X. If given an X, you must extend in both diagonal directions. You can assume that no lines have already be extended. and you can assume the border is intact. Standard I/O format applies.

+--------+ | X | | X | | | | | | | | X | | | | | +--------+ \---X-/--+ \\ / X | |\X / \ / |/\X \/| / /\\ /\| |/ \\/ \ / X\ | | / \\ | | / \\| +-/-----\\ 
added 101 characters in body
Source Link

Your task is to create a function or a program that can take in a String of a grid lines separated by \n and outputs grid lines separated by \n (optionally including a trailing newline). The output should have lines extended as described by the introduction. You can assume that no lines have already be extended. and you can assume the border is intact. Standard I/OStandard I/O format applies.

Your task is to create a function or a program that can take in a String of a grid lines separated by \n and outputs grid lines separated by \n (optionally including a trailing newline). The output should have lines extended as described by the introduction. You can assume that no lines have already be extended. and you can assume the border is intact. Standard I/O format applies.

Your task is to create a function or a program that can take in a String of a grid lines separated by \n and outputs grid lines separated by \n (optionally including a trailing newline). The output should have lines extended as described by the introduction. You can assume that no lines have already be extended. and you can assume the border is intact. Standard I/O format applies.

deleted 298 characters in body
Source Link
Loading
Source Link
Loading