Comments on: Programming Interview Questions 25: Remove Duplicate Characters in String /2012/01/06/programming-interview-questions-25-remove-duplicate-characters-in-string/?utm_source=rss&utm_medium=rss&utm_campaign=programming-interview-questions-25-remove-duplicate-characters-in-string Information Retrieval and Machine Learning Mon, 23 Jan 2012 19:14:24 +0000 hourly 1 http://wordpress.org/?v=3.3 By: Arden /2012/01/06/programming-interview-questions-25-remove-duplicate-characters-in-string/#comment-1377 Arden Thu, 12 Jan 2012 22:37:52 +0000 /?p=916#comment-1377 Yes the worst case complexity can be as bad as O(N) in python: http://wiki.python.org/moin/TimeComplexity. But as I noted in the end, I think we may assume constant time in an interview setting. It didn't hurt me at least.. Yes the worst case complexity can be as bad as O(N) in python: . But as I noted in the end, I think we may assume constant time in an interview setting. It didn’t hurt me at least..

]]>
By: ahmet alp balkan /2012/01/06/programming-interview-questions-25-remove-duplicate-characters-in-string/#comment-1371 ahmet alp balkan Thu, 12 Jan 2012 19:53:01 +0000 /?p=916#comment-1371 How are the python sets are implemented? I'm wondering its corresponding in Java and my guess is TreeSet, however it could also be HashSet. http://stackoverflow.com/questions/1463284/hashset-vs-treeset In both cases o(1) operations are not guaranteed. TreeSet guarantees logn and HashSet depends on initially allocated capacity and load factor (hardcoded I assume). How are the python sets are implemented? I’m wondering its corresponding in Java and my guess is TreeSet, however it could also be HashSet.

In both cases o(1) operations are not guaranteed. TreeSet guarantees logn and HashSet depends on initially allocated capacity and load factor (hardcoded I assume).

]]>