"Any possible o(1) space o(n) soln?"
O(1) space and O(n) time complexity ?

On Mon, Jul 18, 2011 at 7:46 PM, saurabh singh <[email protected]> wrote:

> In that case only the size of hash table will be required to increase.Any
> possible o(1) space o(n) soln?
>
>
> On Mon, Jul 18, 2011 at 7:43 PM, shady <[email protected]> wrote:
>
>> O(n) for both space and time.......
>> count the number of times each character is coming = O(n) space in worst
>> case
>> start from the string beginning if character has count == 1 print it O(n)
>> in worst case
>> this works with ASCII characters... since we can hash them on their values
>> 0, 255.......... for languages like hindi, german don't know :)
>>
>>
>> On Mon, Jul 18, 2011 at 7:35 PM, hary rathor <[email protected]>wrote:
>>
>>> can anybody tell me in O(n)  solution,?
>>>
>>>
>>>  --
>>> You received this message because you are subscribed to the Google Groups
>>> "Algorithm Geeks" group.
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to
>>> [email protected].
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> --
> Saurabh Singh
> B.Tech (Computer Science)
> MNNIT ALLAHABAD
>
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to