3.1 of 5 98 reviews
www.iac.com New York, NY 1000 to 5000 Employees

IAC Software Engineer Interview Question (student candidate)

I interviewed in Hangzhou, Zhejiang (China) and was asked:
"given a tree, with a number assigned to each node, and a size N, find the maximum subtree such that: a. it contains N nodes, b. maximizes sum of nodes in the subtree"
Tags: c++ programming
Add Tags [?]
Answer Flag Question

Part of a Software Engineer Interview Review - one of 12 IAC Interview Reviews

Answers & Comments

of 1
DP on tree, M[a][k] = maximum{ M[a.left][i]+M[a.right][N-i-1]+(i==N?0:num[a]), i=0..N }
- Interview Candidate on Apr 9, 2012 Flag Response

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.

Glassdoor is your free inside look at IAC interview questions and advice. All interview reviews posted anonymously by IAC employees and interview candidates.