Work in HR? Unlock Free Profile

MySpace Senior Developer Interview Question

I interviewed in Los Angeles, CA and was asked:
"In .net take a list of integers and return the smallest one there,"
Add Tags [?]

Part of a Senior Developer Interview Review - one of 30 MySpace Interview Reviews

Answers & Comments

of 0

public int test1(int[] intArray) {
int x;
if(intArray.length == 0) {
  return -1; //no array passed in
   x = inArray[0];
  for(int i =1; i <= intArray.length; i++) {
    if( x <= intArray[i]) {
      x = intArray[i];
     return intArray[i];

- Interview Candidate on Jun 15, 2010

To comment on this question, Sign In with Facebook or Sign Up

Tags are like keywords that help categorize interview questions that have something in common.