Trimming a binary tree

Code to trim a binary tree, between two boundary inputs. public class TrimBinarySearchTree { public class TreeNode { int val; TreeNode left; TreeNode right; TreeNode(int x) { val = x; } } TreeNode start = null; boolean z = false; public TreeNode trimBST(TreeNode root, int L, int R) { _trimBST(root, L, R, null); return start;…
Read more

Cloning a graph

Cloning a graph is one of the easier problems. A quick code demonstrates this … import java.util.*; public class CloneGraph { public class Node{ int val = 0; List neighbors = null; public Node(int val, List neighbors){ this.val = val; this.neighbors = neighbors; } } public Node cloneGraph(Node node) { return duplicate(node); } Map<Node, Node>…
Read more

The fruits in basket problem

You have a list of integers which are fruits. Each int value is a fruit type You have two baskets Each baskets can ONLY contain ONE type of fruit. What is the max fruits you can collect? You can only go left to right on the list. e.g [strawberry, apple, mango, apple] -> answer is…
Read more

Code to tell if a binary tree is balanced

I have heard people say it is easy but it took me some time to get this… ūüôĀ   public class BalancedTree { /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * }…
Read more

Script to git clone all repositories of a user from bitbucket

There you go! 1) Ensure python3 is available. prompt> python3 -V prompt> Python 3.7.2 (Should work with python2 also, but not tested) 2) Make sure you have “requests” module imported prompt>pip3 install requests 3) create a .netrc file in home directory. prompt> cat ~/.netrc machine login <your login name> password <your password> 4) The…
Read more

How to setup CMD key for Ubuntu running in VirtualBox on MacOS

When you start working on Ubuntu VM [running on MacOS in VirtualBox], you will discover that the CMD (‚Ćė) key does not work the same way it did on your Macbook. On MacOS you must do CMD+C to copy something. On Ubuntu you must instead do CTRL+C to copy something. Definitely not what you want! If you press CMD+C when inside the Ubuntu VM, you will instead break out of VirtualBox’s Full Screen mode. There is a simple fix to this problem!

How to set resolution, Ubuntu Guest OS running in VirtualBox on MacOS

I had just installed VirtualBox 6.0 on MacOS (MacbookPro 2018), created a VM and installed Ubuntu 18.10 as the Guest OS. When I started my VM, the ubuntu was a small 400X400 window in the center of the large 2880×1880 Mac resolution.   I had to do the following to fix my resolution. 1. Click…
Read more

Iphone screen repair

How to repair a broken iPhone Screen?

Have a professional repair your broken iPhone screens. It is cheaper than taking it to an Apple store. It is better than trying it by yourself and then calling a tech afterwards. Pros have the tools, and the knowledge.

Instant Pot 6QT Duo

Should I buy an Instant Pot?

Instant Pot is an electric pressure cooker that has consistently held the best seller position for many years now.

So what else must you consider before buying an Instant Pot?

3 important reasons
You can replace many appliances, all currently doing what the Instant Pot can do.
Instant Pot is a Pressure Cooker, Slow Cooker, Steamer, Rice Cooker and Yogurt Maker.
You have adequate counter space.
The Instant Pot is not small in size. Make sure you have space on your counter, one that is also close to a power outlet.
You must at least have 15″ x 15″ x 15″ of free counter space.
You believe conventional pressure cookers to be unsafe and require a safer alternative.

Lenovo USB-C Hub

Does the Macbook Pro 2018 have USB ports or require a USB-C hub?

Yes. It has 4 USB-C ports. You are better off getting the Lenovo USB C Hub, 7 In 1 Type C Adapter With USB C PD Power Delivery, 4K HDMI, SD/TF Card Reader, 3 USB 3.0 Ports Compatible For USB C Devices for the Macbook Pro 2018.

In total there are 5 ports in a Macbook Pro 2018.

4 USB-C/Thunderbolt 3 ports. 2 on each side.
1 Headphone Jack (3.5mm) port.
No other ports!

What is the best laptop today, answer, Macbook Pro

Macbook Pro is the best laptop out there.

The various types of laptops you can purchase today are:

Windows based laptops, including surface books.
Linux based laptops
Mac Lineup from Apple
Windows Laptops
After years of using laptops that run various Windows operating systems (OS), I was not going to buy one again. Fancy as they maybe on the outside, I’m always wary of Windows inside.¬† The ones I had, all crashed at some point and I had to re-image them with Ubuntu.

A Fanny Pack that is Stylish and Practical

The best fanny pack/waist belt for runners and travelers is the Fusion Belt.

Unlike other fanny packs, the Fusion Belt merges fashion and function to give you a stylish but useful waist belt. You just wrap it, open the zip, put in your phone and carry on.

Revealed – The best chopper for dicing onions

The best chopper for dicing onions is not the most expensive, but rather the simple but efficient Vidalia Chop Wizard

Does not come with 7, 8, …, 13 useless attachments.
Comes with the dicer blade, which is absent in most other competitors. The dicer blade is the blade with the smallest squares.

360 Robotic Vacuum Cleaner with Laser Navigating, Multiple-Floor

This robotic vacuum cleaner has over 75% 5 star reviews.


Adjustable Cleaning Modes and Noise Level
Transitions to carpeted areas with ease
Set Climbing Threshold

Comparing Ring Video Doorbells – Video Doorbell vs Video Doorbell 2 vs Video Doorbell Pro vs Video Doorbell Elite

We compare the most important differences between various Ring Video Doorbell models.

Ring Doorbell – Who Stopped By Your Home?

My Uber driver got a call on his phone. It sounded like a door bell. He answered the call and entered into a video conference. On the other end of the video call, was a handyman holding his toolbox.

The handyman had started the video call by ringing the driver’s Ring Video Doorbell. The driver had answered his door remotely using a smartphone. I was fascinated by the whole experience.

Like my driver, you too can answer your door remotely by installing the Ring Video Doorbell device.

Backpack with wheels for school, waterproof, and sturdy

I have always found it difficult to buy backpacks for my son. In fact, I have never gotten one right. Backpacks available at stores like Walmart or Target are flimsy. They are usually not big enough for middle or high school purposes. Once you put in everything a child needs for school, you cannot close these backpacks. By trying to close a full backpack you will end up breaking its zipper mechanism. I have lost many a backpack to this scenario.

Comparing Fender Stratocaster guitars special vs classic vs deluxe series.

A Fender Stratocaster¬†is an excellent guitar. I’m partial to the Stratocaster series. I have owned one for over 10 years and it works just as it did when I first bought it.

Fender Stratocasters are known for their cutaway style. This allows you to play higher frets easily. The special models are slightly longer than classic and deluxe models. The special models come with HSS (Hum, Sing Sing) style pickups. The special models also come with the SSS (three single coil pickups). This is the original Stratocaster style. HSS pickups have a humbucker (double coil) and produces thicker and heavier sounds. These were favored by bands like Nirvana.

Comparing FugeTek FT-569 vs FT-568 vs FT-565, bluetooth selfie stick tripod or monopod

FT-569 is their latest (as of Dec 2018) model
The various parts of FT-569 are shipped inside a cute black pouch. These include,

The tripod itself. What I like most about this model is the Flick Lock system (buttons that open and snap)¬†to increase or reduce the stick’s height. This tripod extends to 51 inches!!¬†This is a huge design improvement to Twist Lock systems. For travel, the FT-569 collapses to a convenient and portable 19 inch long bundle of sticks.

Flying the quadcopter drone, a great under $30 drone.

RC Quadcopter Drone with FPV Camera Live Video – 2 Batteries – Flexible Foldable Aerofoils – App WiFi Phone Control – Altitude Hold 3D Flips & Rolls- 6-Axis Gyro Gravity Sensor RTF Helicopter, Black

Terms of Use | Privacy Policy 
2018-2019 © eXitDiscount