Before I get into a bunch of technical details I want to touch on one thing that is instrumental to know before diving deep: in Linux, everything is a file — you heard that right — everything is a file.
But what about sockets you might say? What about a hard link? These are all files. Simple as that.
The important thing to know is that while everything is a file there are different types of files! This is crucial to know as we build upon our knowledge.
Now that you know that everything is a file it’s important to know that Linux uses something called the VFS — virtual file system. …
We’re going to figure out how to solve this very common interview question.
The first question I get when I ask people this question is:
What’s a netmask?
A netmask is a 32-bit binary mask used to divide an IP address into subnets and specify the number of hosts available on the network. Essentially they are used to create small subnetworks out of an already existing network. This is great for dividing a corporate network up into smaller subnetworks for partitions such as different departments.
Next let’s answer this question with a real life interview questions.
How many IP addresses does a network w/ a netmask of /24 have? …
To kick off the Leetcode Bootcamp we’re going to start off with a fairly simple problem that is asked all the time at companies such as Facebook, Amazon, Apple, Microsoft, and Google. This question is very commonly asked for internships and more junior software engineering positions, but none the less it is an interesting problem that should be taken seriously.
Given an array of numbers return the indices of the two numbers that add up to a specific target.
Welcome to part 1/81 in this mega series on Leetcode problems. If you haven’t heard of Leetcode before it’s an incredible online tool that helps prepare you for the technical problem solving portion of coding interviews at top tech companies.
In this series I’m going to be covering the top 80 Leetcode data structures and algorithms questions you can do to prepare for all things software engineering interviews and prepare for your dream job at a FAANGULDAT (Facebook, Apple, Amazon, Netflix, Google, Uber, Lyft, Dropbox, Airbnb, Twitter).
Why 80 questions?
Well, truth be told a lot of people do upwards of of 400 questions to prepare for the interview but this is pretty much known as a complete overkill by people that have been in the industry for a while. …
First and foremost machine learning carries with it this connotation that it is extremely complex. While it is mathematically rigorous it is really simple when you break it down into mathematical terms and even more simple to grasp once you see a real world example of how it is used all the time on people like you and I. …
Many programmers today use Python3 because of its original implementation in the procedural programming language C. Because of this, it has been coined as CPython.
A shared library is a library that dynamically links during compilation when a user compiles a .c file. Static and dynamic linking are two processes of collecting and combining multiple object files in order to create a single executable file. The main difference between the two is the type of linking they do when creating an executable file.
Contrary to a static library, a dynamic library performs the linking process as a program is executed in Linux. Moreover, dynamic libraries are loaded into memory by programs when they are executed. During compilation, a shared libraries machine code is cached locally and has a version control of sorts that keeps track of what the most recent changes are to the file. …
All computers rely on an operating system to get tasks done and in UNIX humans interact with the operating system with something called a CLI (command line interface). A command line interface is a textual user interface that interacts with an operating system’s Kernel (in this case the Linux Kernel). Take a look at the diagram below as we dive into more details on the inner workings of the Linux Shell architecture.
A static library is a single collection of object code files (created during the compilation process) that speeds up the creation of a program’s executable file, in particular, during the linking phase. However, they make files really large because the entire library is linked to the executable file unlike dynamic libraries that are mapped into the process during runtime.
In C, the static library can be seen in the
/usr/lib/ directory of your Linux operating system. …