O GoConqr está de visual novo! Conte para nós o que você achou.

Flashcards

Sem título

Lidza Louina Psychology 101 Inglês 1 flashcard

Flashcards do conjunto (1)

  1. 1Implement an algorithm to determine if a string has all unique characters. What if you cannot use additional data structures?First question: which characters are we talking about? I'm assuming unicode. Which has more than 120,000 characters.
    First thought: create an array that can hold binary values. All will initially be set to 0. Go thru the string and use the character as a key that maps to the array index. Check if the value is already 1. If not, update the boolean value to 1. If so, break out.
    New idea:
    Implement quick sort, and intercept the value check and merging. If two values are equal to each other, break out.
    Pseudocode solution:
    contains_unique_characters function ( string)
    Checker is 0
    Loop thru length of string

Informações

Descrição
101 Psychology FlashCards sobre Sem título, criado por Lidza Louina em 14-10-2015.
Criado por
Lidza Louina
Visualizações
0
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?