Licious 2024 Papers
Previous year papers with coding questions
Practice Licious placement paper coding questions with detailed solutions. Access Licious OA coding problems in Java, Python, JavaScript.
This page contains Licious coding questions from Licious OA placement papers with detailed solutions.
Licious OA Coding Section:
Solution (Java):
public List<String> recommendProducts(String userId, Map<String, List<String>> purchaseHistory) { List<String> userPurchases = purchaseHistory.getOrDefault(userId, new ArrayList<>()); Map<String, Integer> productFrequency = new HashMap<>();
// Find products frequently bought together for (String purchase : userPurchases) { for (String otherPurchase : userPurchases) { if (!purchase.equals(otherPurchase)) { productFrequency.put(otherPurchase, productFrequency.getOrDefault(otherPurchase, 0) + 1); } } }
return productFrequency.entrySet().stream() .sorted((a, b) -> Integer.compare(b.getValue(), a.getValue())) .limit(5) .map(Map.Entry::getKey) .collect(Collectors.toList());}Time Complexity: O(n²)
Licious 2024 Papers
Previous year papers with coding questions
Licious Main Page
Complete Licious placement guide
Practice Licious coding questions regularly!