Apple Interview Questions
- 0of 0 votes
AnswersGiven a Relation Person(id,name,momid,dadid)
- codemonkey March 09, 2012 in United States
Return all siblings (ie those with common momid,dadid)
eg 1,2| Report Duplicate | Flag | PURGE
Apple Software Engineer / Developer - 1of 1 vote
AnswersGiven an array of ints, is it possible to divide the ints into two groups, so that the sums of the two groups are the same. Every int must be in one group or the other. Write a recursive helper method that takes whatever arguments you like, and make the initial call to your recursive helper from splitArray(). (No loops needed.)
- Anonymous May 02, 2011
splitArray({2, 2}) → true
splitArray({2, 3}) → false
splitArray({5, 2, 3}) → true| Report Duplicate | Flag | PURGE
Apple Arrays - 0of 0 votes
AnswersWhy do we need thread class when we have Runnable interface?
- JavaJava January 20, 2011| Report Duplicate | Flag | PURGE
Apple Software Engineer / Developer Java - 0of 0 votes
AnswersName all the memories which are available in JVM?
- JavaJava January 17, 2011
I knew only heap and perm. Is there any other memory also?| Report Duplicate | Flag | PURGE
Apple Software Engineer / Developer Java - 0of 0 votes
AnswersA application uses different its own server and some external, third party server also. Suppose if external or third party server is unavaiable, how will you test application?
- muskaan December 15, 2010
What will be the approach to test the application when you are not getting third party server?| Report Duplicate | Flag | PURGE
Apple Software Engineer in Test Testing - 0of 0 votes
Answersworking of a browser? -> parsing of html or xml content, how it works exactly?
- Leave it December 03, 2010| Report Duplicate | Flag | PURGE
Apple Software Engineer / Developer XML - 0of 0 votes
AnswersDefine static, virtual destructor?
- Leave it December 03, 2010| Report Duplicate | Flag | PURGE
Apple Software Engineer / Developer C - 0of 0 votes
AnswersCode for tic tac toe
- Leave it December 03, 2010| Report Duplicate | Flag | PURGE
Apple Software Engineer / Developer Algorithm - 0of 0 votes
AnswersWrite a code which return square of any number, but you can not use Star or carrot sign.
- Muskaan November 23, 2010| Report Duplicate | Flag | PURGE
Apple Developer Program Engineer - 0of 0 votes
AnswersThere is 3 text file, like 2008.txt, 2009.txt etc. Every file contains customer id, product id and expenses. Now write java code which will return 5 persons who spent most in these three files. Customer id can be duplicate all over files.
- Muskaan November 23, 2010| Report Duplicate | Flag | PURGE
Apple Developer Program Engineer Algorithm - 0of 0 votes
Answerscalculate area of a polygon using triangulation method
- gullu September 12, 2010| Report Duplicate | Flag | PURGE
Apple Developer Program Engineer Algorithm - 2of 2 votes
AnswersHow many string exists of the following form
- Anonymous August 08, 2010
1) Only characters from 'a' to 'z' allowed
2) No character is repeated
3) Length = 10
4) One and only one character in the string is lexicographically greater than the previous character
For example:
zyxwvutsrq = invalid (0)
zyxwvutrqs = valid! since q>r| Report Duplicate | Flag | PURGE
Apple Software Engineer / Developer - 0of 0 votes
AnswersWhat is a Deadlock, can you give some examples of real world scenarios where deadlock happens ?
- dagnihot March 30, 2010
I am trying to merge into a freeway which is completely backed up and cars are moving very slow, is this a deadlock ? If you had to assign a computer science term to this scenarios what would be the closest thing that comes to your mind ?| Report Duplicate | Flag | PURGE
Apple Software Engineer / Developer Threads - 0of 0 votes
AnswersWhat is the main reason for using pass by reference over pass by pointer
- dagnihot March 27, 2010| Report Duplicate | Flag | PURGE
Apple Software Engineer / Developer C++ - 0of 0 votes
AnswersHow do you debug if safari crashes?
- lingrong March 26, 2010| Report Duplicate | Flag | PURGE
Apple Software Engineer / Developer - 0of 0 votes
Answersdetecting deadlock
- mojo dojo :) March 19, 2010| Report Duplicate | Flag | PURGE
Apple Software Engineer / Developer Threads - 0of 0 votes
Answershow does tcp and udp together react
- mojo dojo :) March 19, 2010| Report Duplicate | Flag | PURGE
Apple Software Engineer / Developer Networking / Web / Internet - 0of 0 votes
Answerhow does tcp react in wireless, different tcp versions
- mojo dojo :) March 19, 2010| Report Duplicate | Flag | PURGE
Apple Software Engineer / Developer Networking / Web / Internet - 0of 0 votes
Answersimplement atoi
- mojo dojo :) March 19, 2010| Report Duplicate | Flag | PURGE
Apple Software Engineer / Developer String Manipulation - 0of 0 votes
Answerhow to make multicasting reliable
- mojo dojo :) March 19, 2010| Report Duplicate | Flag | PURGE
Apple Software Engineer / Developer Object Oriented Design - 0of 0 votes
AnswersWhat is the difference between a C++ array and an STL array type
- dagnihot March 01, 2010| Report Duplicate | Flag | PURGE
Apple Software Engineer / Developer C++ - 0of 0 votes
Answers"Simple Parallel Crypto"
- Pia December 04, 2009
We need a utility that will perform a simple XOR crypto transform. They key will be given as a set of bytes in an external file and the number of bytes in the key will dictate the "chunk size". The plain text data will be given on stdin and the utility must break it into chunk-size sections and XOR it against the key and write the cypher text it to stdout. After each chunk is processed the key is rotated left by one bit to make a new key. This means that the key will repeat every N chunks, where N is the number of bits in the key. The plain text may not be a multiple of the chunk size in length. The plain text may also be very large, far exceeding the available memory+swap space in the system.
In addition to just performing the algorithm, the utility needs to scale so that multiple chunks of plain text can be efficiently processed in parallel on multi-core/multi-CPU machines. As such, a number of threads must be created to process chunks of data concurrently. Regardless of the number of threads, the output cypher text must remain the same.
Any errors/status must come out on stderr.
Required Command Line Options:
-k <filename> Specify the key file
-n # Number of threads to create
Example:
The keyfile contains two bytes: 0xF0 0xF0
The plain text file has the bytes: 0x01 0x02 0x03 0x04 0x11 0x12 0x13 0x14
encrypt -k keyfile -n 1 < plain > cypher
The cypher text has the bytes: 0xF1 0xF2 0xE2 0xE5 0xD2 0xD1 0x94 0x93
Implementation Details/Notes:
The utility can be written in C/C++. If C/C++, it should build and run on a POSIX system (like Linux or Mac OS X). A good way to generate keyfiles and plain text files is as follows:
dd if=/dev/urandom of=plain bs=4096 count=4096
dd if=/dev/random of=keyfile bs=4096 count=1| Report Duplicate | Flag | PURGE
Apple Software Engineer / Developer Algorithm C - 0of 0 votes
AnswersTell me something about your former internship
- Frost November 20, 2009| Report Duplicate | Flag | PURGE
Apple Software Engineer / Developer Experience - 0of 0 votes
AnswersWhat courses are you planning to take in next year?
- Frost November 20, 2009| Report Duplicate | Flag | PURGE
Apple Software Engineer / Developer Behavioral - 0of 0 votes
AnswersHow to develop test case for iPhone
- RKB October 17, 2009| Report Duplicate | Flag | PURGE
Apple Software Engineer / Developer Testing - 0of 2 votes
AnswersHow would you traverse a linked list with complexity O(n^0.5)?
- Murhty September 22, 2009| Report Duplicate | Flag | PURGE
Apple Software Engineer / Developer Linked Lists