Posts tagged with “C”

Important: Pick One Language for the Coding Interview

I wanted to clarify the programming language requirement for the interview. I was under the impression that I needed C++ or Java to do the interview, and that in some cases C would suffice. But I also felt the need to know Python, since it is also widely used. A further reason for getting deep into…

Read more

How to Run Valgrind in CLion, for C and C++ Programs

I needed this for myself, and Googled around but didn’t find anything satisfactory, but now after a little work, I’m all set with Valgrind. Wouldn’t you love this on your toolbar? Well, you can have it, friend. Read on. 1. Add this Bash script I have it in my current project,…

Read more

Binary Search

I thought binary search was just good for sorted arrays, but this article on TopCoder was really good. It got me thinking of all sorts of ways to avoid a linear search when you know a search space has an inflection point that can be tested with a predicate. Here’s my humble implementations of…

Read more

Bit Manipulation

Bitwise operations are a very weak spot for me. ANDing, ORing, and XORing (huh?) bits hasn’t really been anything I can say I’ve needed to do, except for one company that used bitfields to save space. And << and >> have had little practical use for me. By the end of the day,…

Read more

In the Queue

I’m working on queues today. I’m implementing a queue using a fixed-size array, and also using a linked list. These are the four operations each will support: enqueue(value) - adds item at end of available storage dequeue() - returns value and removes least recently added…

Read more

Linked Lists Complete

I ended up with 2 implementations of linked lists in C, an object-oriented approach in C++ (with templates!), and followed up with a smaller OO implementation in Python. I’m pretty proud of these. The C and C++ versions have test suites, so I’m very confident with the code. For the…

Read more

All Up In Linked Lists

Yesterday I started on linked lists, and this one looks like it will go 2-3 days. I started off with a nice C implementation, with many functions for manipulating a list. I was pretty proud, then I started looking around and the other implementations I’m seeing are different from mine. Not…

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

Studying C is Going Well

Just wanted to drop in with a status update. I’m getting through the book and doing some exercises along the way. It’s challenging, yet fun. So I’ll complete this book, and then do more practicing with the language to get really comfortable with it. Then I’ll move on to…

Read more

Back and Ready To Go: Starting with C

So I’ve completed all the work needed for my business, and there are good people in place to keep it running smoothly, so now I can focus on studying for the Google interview. I completed all the classes I was taking, and learned so much, that it really motivated me to make bigger steps. It…

Read more