interview-questions

How to eliminate duplicates from a linked list of unicode characters, without using any extra memory

“Find a recurring element in a linked list of unicode characters. If a unicode character/s is found to have a duplicate then just delete that repeating node and adjust the list. The constraint was to not to use any extra memory.” My answer: Assuming that the unicode char doesn't include surrogate pair char As I am using c# I don't know...

I'm a university student who hopes to intern for a large company (msft, apple, rim, etc). What should I learn?

I'm currently in the third year of my comp sci undergrad degree. Before graduating, I'd like to experience a co-op term with a heavyweight in this field. What topics do you think are most pushed for when trying to get a co-op placement with these companies? ...

What was the best Puzzle/Brainteaser you've ever been asked at an interview? And Why?

There have been many questions related to what one should ask interviewees, what you should ask a company you're interviewing at, etc. I searched and I don't think this one is a duplicate. Also, community wiki from the start. So here goes: What is the most interesting (challenging, fun, original, useful) brainteaser or puzzle question y...

Find a number where it appears exactly N/2 times

Hi All, Here is one of my interview question. Given an array of N elements and where an element appears exactly N/2 times and the rest N/2 elements are unique. How would you find the element with a better run time? Remember the elements are not sorted and you can assume N is even. For example, input array [] = { 10, 2, 3, 10, 1, 4, 10...

Any reason to not ask an interviewee to write code?

Many people, Joel included suggest that a person who wants a job as a developer is asked to write code right in the interview. I think it is perfectly reasonable. If employed he will have to write lots of code and therefore the interviewer would want to check that interviewee really can write code and has not just listed all the words h...

Swap bits in a number in C.

In a C interview, I was asked to swap the first 4-bits of a number with the last 4 bit. (eg. 1011 1110 should be 1110 1011.) Does anyone have a solution for this? ...

Java Developer Interview Question

I worked at a fortune 500 insurance company for almost 2 years. I worked on a reporting application that used Java, XML, XSLT, JavaScript, AJAX. It was a J2EE application but it didn't use any of the major frameworks like Struts, Spring, EJB, any ORM, JAXP, JAXB. But we developed our own software in house that could do that stuff. But ...

Difference between .dll and .exe?

I want to know the exact difference between the dll and exe file. ...

size of a datatype without using sizeof

Hi all I have a datatype say X and I want to know its size without declaring a variable or pointer of that type and of course without using sizeof operator. Is this possible. I thought of using standard header files which contain size and range of datatypes but that doesn't work with user defined datatype. Any help will be appreciated. ...

Is this an over-the-top question for Senior Java developer role?

A recruiter has sent me a fairly long quiz from an employer, and I think it's a bit excessive for what is supposedly a Senior Java developer role. The questions (to me) seem unfocused, and go into areas such as architecture, operations, capacity planning. One of the questions is this: "Internet-scale applications must be designed to pro...

Is this a fair question to ask in a Software Engineering Interview, phase 1?

All, I was promptly asked, upon showing up for phase 1 of an interview, to implement an http server in any scripting language I chose (Ruby/Python, etc.). I was not so accomplished in these languages, so I opted for Java. I was told I had 1 hour of time and I was told that the server must do the following: Reply with a 'hello' respons...

Where can I learn more about datastructure tricky questions?

I am relatively new to programming (around 1 year programming C#-winforms). Also, I come from a non CS background (no formal degree) Recently, while being interviewed for a job, I was asked about implementing a queue using a stack. I fumbled and wan't able to answer the question. After, the interview I could do it(had to spend some tim...

how do you remove a cycle in a single linked list?

I am not sure how would I find the start of the cycle without using O(N) memory and flags ...

Why are so many algorithm problems asked in interviews?

Recently, I have taken interviews and found that many of the questions are related to algorithms and math problems. I think that there are lots of things that are important other than algorithms, such as experience, domain specific knowledge, basic OS/compiler knowledge, etc.. Why do they ask so many algorithmic problems? ...

How does the system know what to use when 'this' keyword is used?

How does the system know what to use when 'this' keyword is used? Recently, I was asked this question in an interview. Having never thought about this, I replied back saying that the system will know the current context in which the flow of control is and decide the object to be used instead of this. The interviewer didn't look pleased ...

Biztalk Developer pre-screening test and interview questions

Similar to other interview question threads, we're preparing to interview candidates for a Biztalk/.NET Webservices/XML/general mid-tier developer position, and I'm looking for some good input from the community. We'd like to pre-screen the applicants (since they'll come from a tech agency) with a written test that covers basic knowledge...

In CLR, what is difference between a background and foreground thread ?

What is difference between a background and foreground thread ? ...

Is it ok to ask an interviewer a technical question?

After you have asked the questions in The Joel Test, is it appropriate to ask a technical question or two to see how the software developers who are doing the hiring respond? If I did technical interviews (and I have only ever done lunch format interviews so my opinion could change I guess), I wouldn't mind a technical question or two, ...

What interview questions should a developer ask a tester?

We have some interviews coming up whereby we're recruiting for a quality assurance role. The purpose of developers being involved is to understand whether hte person will work well with the development team. What are the most important question(s) a developer should ask a QA person? I'm looking for practical questions more than fluffy...

Interview Question: Finding Next and Previous characters in a given string?

We have a language X, which has one byte and two byte characters. This language has following characteristics. Single byte character value will always be less than or equal to 127. In Two byte character, First byte will always be greater than 127 and second byte value can be anything. The problem is, We are given an arbitrary length ...