Aditya Chatterjee's Blog, page 121

January 29, 2022

touch command in Linux

The touch command is used to modify a file's timestamp, this is its primary function even though it can also be used to create files. In this article we discuss both uses of the touch command and commonly used commands.

Table of contents.Introduction.Syntax.Commands.Summary.References.Introduction.

The touch command is used to modify a file's timestamp, this is its primary function even though it can also be used to create files.
It changes the modification and access time for any given ...

 •  0 comments  •  flag
Share on Twitter
Published on January 29, 2022 08:37

history command in Linux

The history command is used to view previously executed commands in the Linux terminal. In this article we discuss the commonly used history commands.

Table of contents.Introduction.Syntax.Commands.Summary.References.Introduction.

The history command is used to view previously executed command in the Linux terminal. This allows us to avoid mistyping or having to remember very long complex commands which we had previously executed.

We can also use the up/down , Ctrl n/Ctrl p to scroll thr...

 •  0 comments  •  flag
Share on Twitter
Published on January 29, 2022 06:54

January 28, 2022

htop command in Linux

htop is a Linux application used for real-time process monitoring. Unlike top command, it comes with many features which makes process management easier. In this article we discuss htop commands, options, shortcuts.

Table of contents.Introduction.Syntax.Output.Shortcuts.CommandsSummary.References.

Pre-requisites:

Top Command in LinuxLinux process management commands: top, ps, kill, jobs, fg, bgIntroduction.

htop is a linux application used for real-time process monitoring.
It can be...

 •  0 comments  •  flag
Share on Twitter
Published on January 28, 2022 16:13

Maximum size square submatrix with all 1s

In this article, we have explored various ways to solve the problem of finding maximum size square submatrix with all 1s. This can be solved using Dynamic Programming.

Table of Contents1) Introduction2) Naive approach3) Recursive approach4) Dynamic Programming approach5) Conclusion

Pre-requisites:

Complete list of Dynamic Programming problems1) Introduction

Given an m×n binary matrix.Find the size of largest square submatrix with all ones.

A binary matrix is that whic...

 •  0 comments  •  flag
Share on Twitter
Published on January 28, 2022 13:53

De Bruijn Sequences

In this article, we have explored De Bruijn Sequences and 3 algorithms to calculate De Bruijn Sequences using ideas like Hamiltonian Cycle, Euler's path.

Contents

IntroductionMethod 1: Hamiltonian CycleMethod 2: Euler's PathMethod 3: AlgorithmIntroduction

Consider a problem where we are given a set A consisting of k numbers. Given an integer n, the objective is to find a sequence of numbers S such that every possible n - digit combination from A occurs exactly once in this sequence. Such a...

 •  0 comments  •  flag
Share on Twitter
Published on January 28, 2022 13:32

Find Cube root using Binary Search

In this article, we have explained the algorithm to Find Cube root using Binary Search along with Time and Space Complexity analysis.

Table of contents:

IntroductionFinding cube root using Binary SearchPerfect CubeCube root with precisionTime and Space Complexity

Pre-requisites:

Binary SearchFind Square root using Binary SearchIntroduction

When someone needs to find the cube of a number, then they can just multiply that number by itself three times, and alas! They have the answer. B...

 •  0 comments  •  flag
Share on Twitter
Published on January 28, 2022 08:13

Search an element in Sorted 2D matrix

In this article, we will learn about how we can search for a particular element in a sorted 2D matrix.

Table of contents:

What is a sorted 2D matrix?Problem we are trying to solveApproaches to solve problemHow to solve problem using Binary Search methodUse of Binary Search method in real lifeFinal question

Pre-requisites:

Binary SearchSearch element in rotated sorted arrayFinding 2 elements with difference k in a sorted array

Let us get started with how we can search for a particular ...

 •  0 comments  •  flag
Share on Twitter
Published on January 28, 2022 07:56

Find Square Root of Number using Binary Search

In this article, we have discussed how to find square root of a number using binary search.

Table of contents:

Introduction to Binary SearchIterative and recursive version of binary searchFinding square root using binary searchTime and Space Complexity

Pre-requisites:

Binary searchFinding Square Root of a Number using Binary Search

While searching for an element in an array, we generally go through all the elements and if the element is found, we will return the element; otherwise, we sa...

 •  0 comments  •  flag
Share on Twitter
Published on January 28, 2022 03:41

One hot encoding in TensorFlow (tf.one_hot)

This article discusses about one of the commonly used data pre-processing techniques in Feature Engineering that is One Hot Encoding and its use in TensorFlow.

One-Hot Encoding is a frequently used term when dealing with Machine Learning models particularly during the data pre-processing stage. It is one of the approaches used to prepare categorical data.

Table of contents:

Categorical VariablesOne-Hot EncodingImplementing One-Hot encoding in TensorFlow models (tf.one_hot)Categorical Variab...
 •  0 comments  •  flag
Share on Twitter
Published on January 28, 2022 03:23

January 27, 2022

Decompilation

Decompilation is the process of converting executable machine code into human readable code. In this article we discuss the steps involved in the decompilation process.

Table of contents.Introduction.Disassembly.Lifting and data flow analysis.Control flow analysis.Type analysis.Summary.References.Prerequisites.Disassembly.Introduction.

Decompilation is the process of converting executable code(machine readable) into high level code(human readable).

A decompiler also referred to as ...

 •  0 comments  •  flag
Share on Twitter
Published on January 27, 2022 15:23