codebytes: TAP2012D SPOJ (Trie with HashMaps) solution Java
TAP2012D SPOJ (Trie with HashMaps) solution Java You need to put all the names first and second team players in the same trie. If your logic involves putting the names of team1 into trie and then using team2 player names, you're likely to get WAs. For eg. changing the order of queries for team2 names will get you different answers in some cases. Check out these test cases:- 5 7 Check out my solution if you're still stuck. Source: import java.io.*; import java.util.*; class Node{ HashMapRead full article from codebytes: TAP2012D SPOJ (Trie with HashMaps) solution Java
No comments:
Post a Comment