[SOLVED] Can you run GUI applications in a Docker container?

[SOLVED] Can you run GUI applications in a Docker container? Original Question – How can you run GUI applications in a Docker container? Are there any images that set up vncserver or something so that you can – for example – add an extra speedbump sandbox around say Firefox? The question is asked or

Continue reading

Top Binary tree interview problems

Here is a curated list of top interview problems on binary trees. These are mostly asked in face to face technical interview rounds. The list contains a wide variety of problems collected from various sources including leetcode, codeforces, codechef, hackerrank and other programming platforms. Practicing these questions would be sufficient enough to brush up your

Continue reading

Construct a BST from preorder traversal

You are given a preorder traversal, you need to construct a binary search tree. Input: {10, 5, 1, 7, 40, 50} is the preorder traversal. Output: 10 / \ 5 40 / \ \ 1 7 50 Algorithm We know that the first element of a preorder traversal if the root of the tree. Leveraging

Continue reading

Left view of a binary tree

You are given a binary tree, you need to print the left view of it. Consider the tree in the below figure. The left view of the tree would be {8, 3, 1, 4}. Algorithm Create a queue which would store the nodes of the tree. Insert the root node in the tree. While the

Continue reading

Path sum equal to k in trees

You are given a binary tree which can have negative elements also and an integer k, you need to print all the paths in the tree which has sum equal to k. Note that the paths need not necessarily be from root to leaf nodes. It can start from any node and can end to

Continue reading

Number of Islands

You are given a 2D grid of 1’s and 0’s where 1’s denotes the land and 0’s denote the water. You need to return the number of islands. An island is surrounded by water and is formed by connecting adjacent lands either vertically or horizontally. You can assume that all the four edges of the

Continue reading


Something went wrong. Please refresh the page and/or try again.

Follow My Blog

Get new content delivered directly to your inbox.