James Michael Hare

...hare-brained ideas from the realm of software development...
posts - 166 , comments - 1431 , trackbacks - 0

My Links

News

Welcome to my blog! I'm a Sr. Software Development Engineer in the Seattle area, who has been performing C++/C#/Java development for over 20 years, but have definitely learned that there is always more to learn!

All thoughts and opinions expressed in my blog and my comments are my own and do not represent the thoughts of my employer.

Blogs I Read

Follow BlkRabbitCoder on Twitter

Tag Cloud

Archives

Post Categories

.NET

CSharp

Little Wonders

Little Wonders

vNext

Little Puzzlers

Little programming puzzles that can be used to test your (or others') programming skills.
Amazon.com Recruiting Event Coming to St. Louis in April
Hey all my friends and readers in the St. Louis area, my team from Amazon is heading to St. Louis to do an in-person hiring event in April!Have you always wanted to work in a place that hires and develops the best? That lets builders be builders? That has excellent benefits and salary/bonuses? That has a clear technical path all the way from entry-level developer to architect and beyond?If you're a developer who loves to solve problems and learn new skills, and be in an environment that encourages ......

Posted On Wednesday, March 23, 2016 11:02 AM | Comments (0) | Filed Under [ My Blog C# C++ .NET Little Puzzlers Technology CSharp ]

Amazon.com Recruiting Event Coming to St. Louis in April
Hey all my friends and readers in the St. Louis area, my team from Amazon is heading to St. Louis to do an in-person hiring event in April!Have you always wanted to work in a place that hires and develops the best? That lets builders be builders? That has excellent benefits and salary/bonuses? That has a clear technical path all the way from entry-level developer to architect and beyond?If you're a developer who loves to solve problems and learn new skills, and be in an environment that encourages ......

Posted On Wednesday, March 23, 2016 11:02 AM | Comments (0) | Filed Under [ My Blog C# C++ .NET Little Puzzlers Technology CSharp ]

Solution to Little Puzzlers - Lowest Common Ancestor
This is the way I went about the "Lowest Common Ancestor" problem. However, keep in mind there are multiple ways to solve this, so don't worry if your solution has variations and it’s entirely possible there are more efficient ways. Feel free to suggest your solution in the comments here or in the original post, but please be respectful of others’ efforts. The Solution The first tendency in this problem is to want to walk back up the tree. This is obviously problematic because we do not have a parent ......

Posted On Thursday, August 27, 2015 12:52 AM | Comments (1) | Filed Under [ My Blog C# Software .NET Little Puzzlers Technology ]

Solution to Little Puzzlers–“List All Anagrams in a Word”
This is the way I went about the "List all anagrams in a word” problems. However, keep in mind there are multiple ways to solve this, so don't worry if your solution has variations and it’s entirely possible there are more efficient ways. Feel free to suggest your solution in the comments here or in the original post, but please be respectful of others’ efforts. The Solution There are many ways to tackle this problem. Ultimately, the main goal of this problem was to be able to return all the anagram ......

Posted On Tuesday, August 4, 2015 4:22 PM | Comments (6) | Filed Under [ My Blog C# Software .NET Little Puzzlers Technology CSharp ]

Little Puzzlers–List all anagrams for a word
I like to keep my brain sharp by working on programming puzzlers. On off weeks I'm going to start posting programming puzzlers I've collected over the years. Hopefully you'll find them as entertaining as I do. The Problem Given a file of all valid words in the English language, write an algorithm that would be suitable for a web page that will list all valid English words that are complete anagrams of the word entered by the user on the page. That is, if the user visits the page and types in POST, ......

Posted On Tuesday, July 28, 2015 1:43 AM | Comments (11) | Filed Under [ My Blog C# Software .NET Little Puzzlers Technology ]

Solution to Little Puzzlers–Find the Majority Element
This is the way I went about the "The Majority Element” problems. However, keep in mind there are multiple ways to solve this, so don't worry if your solution has variations and it’s entirely possible there are more efficient ways. Feel free to suggest your solution in the comments here or in the original post, but please be respectful of others’ efforts. A Linear-Time, Linear-Space Solution As with so many puzzlers, there is more than one way to tackle this problem. Let’s first consider the more ......

Posted On Monday, July 20, 2015 10:53 AM | Comments (6) | Filed Under [ My Blog C# Software .NET Little Puzzlers Technology ]

Little Puzzlers–Largest Square of ‘1’s in a Matrix
I like to keep my brain sharp by working on programming puzzlers. On off weeks I'm going to start posting programming puzzlers I've collected over the years. Hopefully you'll find them as entertaining as I do. Another fun one that I enjoyed solving. As usual with these problems, there’s a fairly straightforward solution -- and a very efficient but harder to find solution. The Problem Given a square 2D array of 1s and 0s, find the starting position (top left row, column) and size of the largest, solid ......

Posted On Monday, April 20, 2015 11:38 AM | Comments (8) | Filed Under [ My Blog C# Software .NET Little Puzzlers ]

Solution to Little Puzzlers–Largest Puddle on a Bar Chart
This is the way I went about the “Largest Puddle on a Bar Chart” problem. However, keep in mind there are multiple ways to solve this, so don't worry if your solution has variations and it’s entirely possible there are more efficient ways. Feel free to suggest your solution in the comments here or in the original post, but please be respectful of others efforts. My Approach Of course, the most straight-forward approach could be performed by taking each bar, and finding the pool starting at that bar ......

Posted On Monday, April 13, 2015 8:56 PM | Comments (3) | Filed Under [ My Blog C# Software .NET Little Puzzlers ]

Little Puzzlers–Largest Puddle on a Bar Chart
I like to keep my brain sharp by working on programming puzzlers. On off weeks I'm going to start posting programming puzzlers I've collected over the years. Hopefully you'll find them as entertaining as I do. This is perhaps one of the more fun problems I’ve had to solve in an evaluation situation before. I’m not claiming I have the optimal answer, so I’ll be curious to see what you all come up with as well! The Problem: Given an array of int that represents the height of bars in a bar chart, calculate ......

Posted On Tuesday, April 7, 2015 1:28 PM | Comments (24) | Filed Under [ My Blog C# Software .NET Little Puzzlers ]

Solution: Little Puzzlers–Is tree a Binary Search Tree?
This is the way I would go about the “Is tree a Binary Search Tree” problem if I were asked to perform it at an evaluation. However, keep in mind there are multiple ways to solve this, so don't worry if your solution has variations. The Wrong Path The temptation here is to naively think of a BST as simply having the restriction that the left child of x must be < x and the right child of x must be > x. The problem is that this is not the accurate definition. The definition of a BST is that the ......

Posted On Monday, March 30, 2015 12:22 PM | Comments (9) | Filed Under [ My Blog C# Software .NET Little Puzzlers ]

Solution–Little Puzzlers: First Non-Repeating Character
This is the way I would go about this problem if I were asked to perform it at an evaluation. However, keep in mind there are multiple ways to solve this, so don't worry if your solution has variations. When solving these sorts of problems, the first thing you should do before writing any code is test your assumptions and clarify requirements. Often times tech companies use these sort of questions to see if you just dive into coding with no set design, or if you really think out the edge cases. First ......

Posted On Sunday, March 15, 2015 8:54 PM | Comments (21) | Filed Under [ My Blog C# Software .NET Little Puzzlers ]

Little Puzzlers: First Non-Repeating Character
I like to keep my brain sharp by working on programming puzzlers. On off weeks I'm going to start posting programming puzzlers I've collected over the years. Hopefully you'll find them as entertaining as I do. The Problem ?Given an unbounded sequence of characters, find the value and position of the first non-repeated character. e.g., in the stream: A,B,C,D,C,B,A,F,A,F the first non-repeated character is D. For the purposes of this exercise, consider the following interface as the source of the stream: ......

Posted On Monday, March 9, 2015 9:22 AM | Comments (22) | Filed Under [ My Blog C# .NET Little Puzzlers ]

Powered by: