Write an algorithm to detect if there is a loop in a singly linked list. *Hint:* The best solution can be done in O(n) time using constant memory.

This site features a collection of common technical interview questions gathered by a group of programmers who have been through, and given, lots of technical interviews. There is an emphasis on C++ and game programming technical interviews, but most of the questions are relevant to any technical interview.

*Hint:* The best solution can be done in O(n) time using constant memory.

1 response...

Write a function the returns the largest sum of contiguous integers in an array. For example, if the input is (-5, 2, 3, -3, 0, 5, -15), the largest sum is 7.

int LargestContiguousSum(int*iArray, int len)

{

{

*n*. Write a function that determines the index of the first instance of a particular number, and how many instances of that number are in the array.

Recommended Reading:

Programming Interviews Exposed

This book teaches you critical interviewing skills such as how to ask effective questions, how to best approach a problem, and what to do when you get stuck. Integrated throughout the book are problems
taken from real interviews at top computer companies, followed by an in-depth analysis and explanation of the thought process leading to solutions.

Complete the following function to clear a block of memory (initialize all the bits to zero). The block of memory starts at *pStartByte*, and is *numBytes* long.

void clearMemory(void *pStartByte, int numBytes)

{

{

Do you have a technical interview question you would like to submit? Some tips you would like to pass on? Just want to say hi? Feel free to contact us