Category Archives: Technical Interview

Quick Sort

This quick sort implementation comes from ‘Programming Pearls’ by Jon Bentley. The basic idea of quick sort is ‘divided and conquer’. Choose the pivot Partitioning the array to have half the elements are above the pivot and half the elements … Continue reading

Posted in Algorithms, Technical Interview | Tagged , | Leave a comment

What’s your favorite, C or C++? Which one is better? Especially in embedded system. Why?

Since moving to firmware development three years back, I’ve been using only C. The reason most people prefer C to C++ in programming embedded system is, IMHO, there are not much benefits we can earn from C++. Even worse, by … Continue reading

Posted in C, C++, Technical Interview | Tagged | Leave a comment

Where do you see yourself in 3-5 years?

Who can tell what will happen in the next year, what alone the next 3 or 5? Then why is it still an interview question? When interviewers ask you this, they aren’t looking for a definitive reply. Nothing is certain … Continue reading

Posted in Behavior questions | Tagged | 3 Comments

Contains Duplicate

Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return false if every element is distinct. Difficulty: Easy The … Continue reading

Posted in Algorithms, C | Tagged , , | Leave a comment

Merged two sorted lists

Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists Difficulty: Easy There may be one more ways to solve this problem. … Continue reading

Posted in Algorithms, Technical Interview | Tagged , , | Leave a comment

Merge Sorted Array

Given two sorted integer array A and B, merge B into A as one sorted array. Note: You may assume that A has enough space (size that is greater or equal to m + n) to hold additional elements from … Continue reading

Posted in Algorithms, Technical Interview | Tagged , , | Leave a comment

Singleton Pattern

어제 ‘Programming game AI by example’을 읽던 중 Singleton이란 개념을 처음(아마 한 8년 전 쯤에는 알았을지도.) 접했다. If singletons are a new concept to you, and you decide to search the internet for further information, you will discover they fuel … Continue reading

Posted in C++ | Tagged , , | 3 Comments

Cache Write Policy – Writeback or Writethrough

When the processor core writes to memory, the cache controller had two alternatives for its write policy. The controller can write to both the cache and main memory, this is known as write through. Alternatively, the cache controller can write to … Continue reading

Posted in ARM, Technical Interview | Tagged , , , , | Leave a comment