Posts tagged with “computer science”

Fun with Tries

I’m a fan of tries. I can’t claim that I’ve used them in practice, but I wish I had. They’re super! Common uses: substring search spell check autocomplete This is an implementation I just put together. Enjoy! Trie API: add(word) - Add the given word to the…

Read more

Retaining Computer Science Knowledge

I’ve been asked numerous times, “How do you remember all the stuff you’ve been studying?” Here’s my method that will keep all the good stuff in your brain. My Mistake in the Beginning When I first started studying, I was watching videos all day long, taking tons of…

Read more

Tackling Entropy

I’ve heard the term “entropy” over the years and never understood it until now. I used to think entropy was randomness, and it’s kind of related. Entropy can be defined in a few ways, some more complicated than others. Entropy is a measure of how much information is gained…

Read more

An Experiment in Sorting in Linear Time

Yes, you can sort in linear time, as long as you’re avoiding comparisons. Radix sort and counting sort are two examples. They both avoid comparisons, and are possible because they sort based on grouping by a single element at a time, where that single element is a letter or digit (in…

Read more

Context Switch in My Coding Interview Study Plan

Time management can be tough. I found myself spending way too long on some subjects. Some take more time than others. Graphs, trees and sorting take more time to go over than studying priority queues, for example. But I could just watch videos on dynamic programming for days. I just keep learning…

Read more

Graphs and Dynamic Programming

I’ve been learning graphs and dynamic programming somewhat interleaved. Dynamic programming tends to help solve graph problems because: Every problem solvable by dynamic programming can be represented in a DAG. A couple of things I discovered in my experiments: Using a queue for graph…

Read more

So Much Sorting

I put on my sorting hat and watched many, many videos on sorting. The videos covered: bubble sort selection sort insertion sort heap sort merge sort quicksort counting sort radix sort There are several more sorting algorithms I could have gone into, but I had to stop somewhere. I’d like to…

Read more

My Summer Reading List

Technically, I started reading in April, but look at that stack! I’m not spending too much time reading on a daily basis right now. I want to get past the learning phase, then once I’ve had enough exposure to the main requirements for a coding interview, I’ll spend half the day…

Read more

Working to Become a Unix/Linux Master Plumber

I’ve been reading an old but great book, The Unix Programming Environment (1984), by Brian Kernighan (of K&R C fame) and Rob Pike. I think it’s no longer in print, because the price on Amazon for a new paperback is over $50. On Half.com you can find it for less than $10. The book…

Read more

Priority Queues: Heap Implementation

I made a departure after studying binary search trees to visit priority queues and heaps. I had planned to do this one later, but it kept coming up in lectures. I really like heaps. They are space and operation efficient, easy to understand and code, and make sorting easy. What’s not to…

Read more

Flash Cards Site Complete

As I mentioned a few days ago, I was putting things on hold for a bit to put together a quick little website that would let me create, manage, and memorize flash cards, so I can keep all this computer science info in my brain. The site it done! It’s very simple and was built…

Read more

Exploring Endianness (Octet Ordering)

As I get deeper into my computer science studies, I’m learning about Endianness. More on this subject here: https://en.wikipedia.org/wiki/Endianness Endianness is the ordering of octets in memory and ISAs (instruction set architecture), but not CPU registers. Big-endian stores the most…

Read more

Binary Trees

I’ve moved on to trees, and I have many trees to cover. The types of trees I’m studying: binary search tree: BST red/black tree splay trees AVL trees B-Trees: 2-3 (type of B-tree) Search Trees N-ary trees Tries Heap Binary Heap Disjoint Sets Priority Queue Here are a few code samples…

Read more

Hamming Code

This is a bit of a departure from data structures (which I’m in the middle of), but I wanted to cover Hamming Code and Error Checking since I had just covered bitwise operations. I’m really impressed with this marvel. If you don’t know, Hamming Code is a special way of laying out…

Read more

Spending a Couple Days on Hashing Functions

In my study of data structures, I’ve made it to hash tables. I’m spending a little extra time on this one, because there is some math and inherent gotchas in hashing and I want to fully understand. I may not get all the math, but I’ve got the important bits. In addition, hash…

Read more

Hand-Crafted Vectors

I’ve been continuing my studies in computer science by implementing a vector (automatically resizing array) without using arrays. I started with C, and wanted to get more experience with allocating/freeing memory and practicing with pointers on an array of integers. I don’t use the []…

Read more

Starting The Daily Plan

I’ve been putting together a long list of items to study for the software engineer interview: The Computer Science Areas Involved With this project, you can follow along with all the areas I’ll be studying: algorithms data structures coding problems books videos articles Items that…

Read more