This is the first post for the CTCI. I will post the solution to the CTCI problem regularly. This series will give you intuition and strategy, how to come up with the solution problem.

  1. Is Unique: Implement an algorithm to determine if all characters in a string are unique. What if you cannot use additional data structures?

You need to be able to come up with keywords: ASCII, Unicode, the number of characters, flag

We need to thread those beads into one algorithm. First of all, it is important to assume which character type we are going to use, ASCII…

MRI is frequently used for medical purposes and research. It helps to watch the inside of people without surgery. This is a huge advantage. How is it possible? We are going to deep inside of the MRI and find out why it works in this post.

MRI uses the magnetic resonance of atomic nuclei(mostly hydrogen). To make magnetic fields, it requires a strong static magnetic field, it is needed always. We emit high-frequency electromagnetic pulses when we are trying to scan the subjects, it is resonance.

Nuclear Magnetic Moment

This video is really helpful to understand MRI with animation.

Now, we know how to analyze the images by my previous posts. However, we don’t know how the instruments work. I will explain Light Microscopy and Electron Microscopy first. The next post will be the MRI.

Light Microscopy

This is a really well-known microscopy. You can observe the magnified objects with your naked eyes. However, our eyes can only see objects that are bigger than the light wavelength. If they are smaller than the wavelength, then we cannot see it with Optical Microscopy. e.g. Virus cannot be observed. …

The nature of the image is actually edges. Edge detection extracts salient features of the image by subtracting complex intensities in the image. Edges are caused by a variety of factors. There are four examples of edges, surface normal discontinuity, depth discontinuity(surface is not ended but we cannot see it in the image), surface color discontinuity, and illumination discontinuity(shadow is ended). From now on, I am going to explain how we detect those edges in the image.

What is the edge?

I explained to you four types of edges. Is there any commonality among those edges?

We can apply operators to an image. We can make images brighter or darker. We can flip or move the image. Convolution is one specific kind of operator to modify the image or extract features from the image. In this post, I will explain how convolution does denoising and sharpening to images.

Linear Filtering

When you take a picture, you got a blurred picture. How do you solve this blurring? Maybe you can take another shoot or you can use a filter to denoise. As the generation of smartphones begins, people use a lot of applications to filter their pictures. …

When you have a high dimensional dataset, it is hard to visualize or recognize the pattern. Low dimensionality is the rule of thumb in Chemoinformatics but it is not easy to maintain because we need a lot of descriptors to get the information. It is also hard to build low dimensionality from the beginning since we cannot know the independent of vectors and their correlation. Therefore, dimensionality reduction is preferred.

Dimensionality Reduction

The advantages of Dimensionality Reduction are:

  1. Balanced compound distributions
  2. Orthogonal reference spaces
  3. Improved interpretability
  4. Possible visualization

Non-linear Mapping

MDS(Multidimensional scaling)

You can check my post.


You can check my post.

Cell-Based Partitioning Methods


This space is what we are trying to study and determine how we decide the distance. We will use the distance between compounds and we can conclude the similarity. If they are far from each other, then it is not similar to each other in this descriptor space. Then, we can find a potential drug candidate.

Distance and Metric

They are different but people used to think of it as the same concepts. The metric includes the distance. If the distance wants to be a metric, then it needs 4 conditions.

  1. All distances are positive
  2. The distance between identical objects is 0. If…

If you want to deal with chemicals as a data scientist, you must know what is descriptors. Data scientists are familiar with the numerical values and vector spaces because they have a lot of methods to solve the various problems in the data science field. Can we turn the chemicals into numerical values and do the math? Yes, we can. This is why we need descriptors.


Definition: molecular descriptors are mathematical functions applied to molecular representations that characterize the properties of molecules. There are three types of descriptors, 1D, 2D, and 3D. 1D is based on the composition formula. 2D…

This post will explain how Molecular Graph-Based Similarity is calculated to find subgraph/substructure. There are many algorithms for this purpose but we are going to get through 3 algorithms.

Subgraph/Substructure Search

We need to define what is a subgraph and what is a subgraph search. First of all, the subgraph is part of the chemical structure. You can check it with the above graph. We want to search for every chemical that has exactly the same substructure. We have a compound database and a small query fragment(substructure).

Actually, my bachelor was Applied Chemistry and Bioengineering. It was a nice time to study invisible things. I studied how they are reacting in a specific condition. To understand those things, we need to learn organic chemistry, it explains how each substituents act. Can we expect these activities with computers? Can we discover drugs? Chemoinformatics will give the answers. To know those things, we need to know how to put chemicals in the computer world, it is a binary world. Hello World Chemicals!

Graph Theoretical Representation

Aspirin Structure

This is an aspirin, the most successful drug in the world. You don’t have to know all…


Jeheon Park, Student, B-it (RWTH Aachen & Bonn University Information Technology Center), Germany, South Korean, Looking for Master Thesis Internship.

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