0%

Description

Difficulty: Medium

Given a 2D board containing 'X' and 'O' (the letter O), capture all regions surrounded by 'X'.
A region is captured by flipping all 'O's into 'X's in that surrounded region.

Example:

X X X X
X O O X
X X O X
X O X X

After running your function, the board should be:

X X X X
X X X X
X X X X
X O X X

Explanations:

Surrounded regions shouldn’t be on the border, which means that any 'O' on the border of the board are not flipped to 'X'. Any 'O' that is not on the border and it is not connected to an 'O' on the border will be flipped to 'X'. Two cells are connected if they are adjacent cells connected horizontally or vertically.

Read more »

由于大部分课程都是德语授课,接触的很多专业词汇也都是德语的(当然也有很大一部分是英语),导致很多概念对应不上中文,比如我最近才知道栈原来指得是 Stack。不知道大家有没有跟我一样的困扰呢…

总而言之这里打算开一篇文章专门记录专业词汇的中/英/德对照表,主要计算机和经济领域,等词汇多了我会再做个分类,长期更新!

如果有任何补充或者发现错误,欢迎大家在最下方留言指出~

Read more »

Welcome to MarkdownPad 2

MarkdownPad is a full-featured Markdown editor for Windows.

Built exclusively for Markdown

Enjoy first-class Markdown support with easy access to Markdown syntax and convenient keyboard shortcuts.

Read more »

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Read more »