Why do I quit Leetcode contest?

Foreword

The title is quite "Yin-ish" as it seems, but I'm not a "Yin-ist". You know what I mean.

Why I quit?

I did a quite a good job in Leetcode Weekly Contest, at least in my point of view. I won a 4th place and a 6th place in …

more ...

Single Number Problem

Introduction

There are a lot of interview problem based on the 1D-array, which is the one of the easiest "data structure".

But the problem about that simple data structure might not be that simple. Here is the summary of the problem about 1D-array.

Of course, most of them come from …

more ...

How to "Rotate Image"?

啥?

原题戳我

Rotate Image

You are given an n x n 2D matrix representing an image.

Rotate the image by 90 degrees (clockwise).

Follow up:

Could you do this in-place?

示意图如下:

rotate-image

当然,矩阵中的数字不一定是规律的。

为什么要提出这个问题

自觉是一个不聪明的人(双低。。。<(=@_@;=)?>)。

别人一下子就想明白的事,在我这里要计算好几个来回。

所以努力想找到一个思维方法去弥补这个不足。

就以这题为例,如何使用简单、直接的方法,迅速正确的找出变化的映射规律。

初步思路 …

more ...