Solutions to programming interview questions at some of the top companies in the world: cppcodingzen.com

Given an array of integers, find the first missing positive integer in linear time and constant space. In other words, find the lowest positive integer that does not exist in the array. The array can contain duplicates and negative numbers as well.

For example, the input `[3, 4, -1, 1]`

…

*This short post is going to explore how Graph theory algorithms appear in seemingly unrelated problems during coding interviews.*

*Feel free to explore **previous** **posts** to read more problems (and their solutions) involving Graph algorithms.*

You are given a circular lock with three wheels, each of which display the numbers…

Regular expression matching provides quick and efficient solution to many interview problems. In this short post, we are going to explore how a regular expression can decide whether a string represents a valid number.

This interview question was asked by LinkedIn.

Given a string, return whether it represents a number…

*This post will tackle a problem of optimally splitting a tree (or removing edges from it), and will discuss how Greedy algorithms result in simple solution to the problem. The whole solution fits within about 40 lines of code.*

*Feel free to read a **few older posts* *to read more…*

This simple short post illustrates how Graph problems appear at a variety of places during a coding interview. Today’s problem deals with a *Directed Acyclic Graph (DAG), *and *Topological sorting* of a DAG. The problem was asked by Airbnb.

Feel free to look at some of the older graph theory…

*Bit manipulation and bitwise operators are some of the hardest problems in programming interviews. This post discusses an interesting bit manipulation problem. The problem was asked by Salesforce.*

Given an array, find the maximum AND value generated by any pair of element from the array.

Examples:

`Input : arr[] =…`

*Data structure manipulation comes up pretty frequently in programming interview questions. This post discusses manipulating a linked list to design stacks. The problem was asked in a programming interview by Microsoft.*

*This post also adds more robustness to the implementation by using C++ language support (iterators and templates). A command…*

*Some of the most interesting programming interview questions are based on arrays. The inputs of these interview questions are simple arrays of integers or floating point numbers. …*

Here is the copy of Satoshi’s famous White Paper on bitcoin: https://cppcodingzen.com/bitcoin.pdf. Please read, understand, distribute, upload this paper on your website if you care about open and free internet.