LeetCode Question · Feb 2025

No Ancestor Subset Hackerrank DE Shaw

1 upvote 139 views 2 replies

Question Details

Solution: public static long findMaximumSum(int treeNodes, List<Integer> treeFrom, List<Integer> treeTo, List<Integer> weight) { Map<Integer, List<Integer>> graph = new HashMap<>(); for (int i = 1; i <= treeNodes; i++) { graph.put(i, new...

Full Details

🔒

Unlock all D.E. Shaw questions

Full insider details, leaked discussions, and candidate experiences.

or every company, $100/year →

About This Question

This is a reported interview question from a d.e. shaw interview for a swe role during the oa round reported in 2025.

It covers the following topics: Hash Table, Graph, Arrays, Dynamic Programming .