The problem’s link:

This problem’s difficulty level is EASY, but to be honest, the solution didn’t pop up into my mind straight away after reading the description. However, I found one way which is easy understanding and light code to solve it.

I won’t explain the requirement here, so before reading the below explanation, I highly suggested that making sure we understand this problem’s description.

The sample input is

5 2
0 4
Image for post
Image for post
Maximum distance to reach the nearest space station

Okay. It means that there are 5 cities and 2 of them have a space station, and these two cities are respectively 0 and 4. …

Circle CI is a CI/CD service, which is quite convenient to help you deploy your code to the remote server. This post aims to provide a solution to one frustrating problem that you probably met with CircleCI, which is not enough information to prompt when your program stops at the compiling stage. Simply like the picture below:

Here is the concept of the solution. We can create a container based on the same docker image that you used in CircleCI and run the compile command of your program in this docker. …

In real projects, it is common to increase the EBS volumes on the EC2 as the project develops deeper and further. In this module, I will lead you to finish it step by step:

Important to notice that creating a snapshot of the target’s volume before resizing volume is always a secure way. Go to your EC2 dashboard -> Elastic block store -> Volumes, in the Actions you can find Create Snapshot.

1. Increasing disk space

In Volumes -> Actions, you can choose to Modify Volume to increase the size of the volume (only allow the upgrade, not downgrade).

2. Resizing a Linux partition

Log in your EC2 instance using an SSH client. …


oscar zhou

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store