0% found this document useful (0 votes)
71 views42 pages

10 The Most Used Data Structures

The document discusses several commonly used data structures: stacks, queues, lists, hash tables, trees, and B-trees. Stacks follow a last-in, first-out principle while queues are first-in, first-out. Lists come in many forms like linked lists. Hash tables store key-value pairs using hash functions. Tree structures like binary trees have nodes connected by edges in a hierarchical structure. B-trees are balanced tree structures well-suited for large data storage systems.

Uploaded by

Patrick Hugo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views42 pages

10 The Most Used Data Structures

The document discusses several commonly used data structures: stacks, queues, lists, hash tables, trees, and B-trees. Stacks follow a last-in, first-out principle while queues are first-in, first-out. Lists come in many forms like linked lists. Hash tables store key-value pairs using hash functions. Tree structures like binary trees have nodes connected by edges in a hierarchical structure. B-trees are balanced tree structures well-suited for large data storage systems.

Uploaded by

Patrick Hugo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

PRESENTATION

The Most Used Data Structures


1
Capítulos
PRESENTATION
THE MOST USED DATA STRUCTURES

Lesson Transcript 03

Transcript + Translation 09

Vocabulary 23

Grammar 29

Mistakes 40

Inglês pra Dev


Lesson Transcript The Most Used Data Structures

Today we’re gonna be discussing Data Structures. Now, what exactly are Data
Structures? Well, a data structure is technically a named location that could be used
to store organized data.

We’re gonna be talking about a lot of different types of Data Structures, from
most basic to more advanced types. You’re gonna come across a lot of different types
of Data Structures, and it’s good to be well versed in just about every type of form you
could see, especially the basic ones.

We’ll be discussing the first data structure, called a “stack”. Now, this is one of
the most commonly referred to and known data structure. It is a linear data
structure that follows the principle of “Last In, and First Out”, this means that the last
elements inserted inside a stack is removed first.

You could think of the “stack” Data Structure as a pile of plates, all on top of
one another. Though simple, stacks are incredibly powerful, and they’re most
commonly used in compilers, and even in memory caches, where URLs can be saved
when you’re jumping between different hyperlinks.

Now, talking about stacks, we also… also need to know about “queues”. A queue is a
data structure that follows the same kind of linear format, but instead of using “Last In,
First Out”, it uses the “First In, First Out” methodology. Essentially, the first one in (in,
say, a line, here) is gonna be, then, the first one out when the next one comes in.

3
Lesson Transcript The Most Used Data Structures

Think of a line for a hot dog stand. You will have customers waiting as you serve
others. The people waiting are in a queue per se, and queuing data structures can be
used in this application, where you can try to find optimal serving times. Moreover,
you could even use it for CPU scaling applications and, again, ticket services, such as
movie theaters.

Moving on to another data structure... is “lists”, and everyone is pretty familiar with
lists, but in this instance, Data Structures, when it comes to lists, there are several
categories of lists. A Linked List is a linear data structure that includes a series of
connected nodes. Here, each node stores the data and address of the next node
linked to it.

Linked Lists can be of multiple types: they can be singly linked lists, doubly, and
circular linked lists, and lists are very common in today’s programming languages,
such as Python, which even utilizes dictionaries, and Java, C, C+.

But the last data structure I’d like to discuss, and more in basic, relative terms, is a hash
table. Hash tables take a new index by processing it using keys. The element
corresponding to that key is stored in the overall index.

Essentially, hash tables are Data Structures that store elements in a “key-value”
pair. You could think of this as, like, a “row to column”, or a “observation to variable”
kind of pairing, where the key is a unique integer that is used to store for indexing
the value, and the value is the data.

4
Lesson Transcript The Most Used Data Structures

In hash tables, you’re gonna be having to deal with hash functions, and these
hash functions sometimes may generate multiple keys for, say, the same index, and
this will be a conflicts within your hash table. This is called a “hash collision”, it’s
very common, and there’s a lot of methodologies to go about trying to solve this.

One of them is called “chaining”, it’s a hash function that produces the same
index by using multiple elements, and these elements are stored in the same
index by using a doubly linked list. So, instead of having one node, there’s two.

Now, let’s discuss a more advanced type of Data Structure, which is “trees”, decision
trees. These previous data structures that we were just talking about: lists,
stacks, queues, hash tables, they’re all examples of linear data structures that
store data sequentially. But in order to perform any operation in a linear data
structure, the time complexity increases with the increase in the data size.

In today’s modern time, this can be very computationally taxing, but different tree
Data Structures allow quicker and easier access to the data, as if it was non-
linear. Now, a decision tree is composed entirely out of nodes and edges. A node
is an entity that contains a key or value and points to child nodes, nodes underneath
it. So, the top node is usually referred to as the “root node”, the topmost, and
beneath it are gonna be child nodes.

5
Lesson Transcript The Most Used Data Structures

Now, what connects these nodes is something called an “edge”. Edges can connect
any two nodes, and overall, nodes are commonly referred to as “child nodes”, but
also “internal” or “external” nodes, where the external node is the last and final node
at the end of the tree, of the path; and internal nodes are the ones that connect
to at least one child, one or more.

Now, decision trees, again, have a lot of capabilities and a lot of different types of
structures within them. There’s a lot of different types. One very, very common,
and always referred to, and I’ve used it so many times at this point in my career,
is a binary tree. Binary tree is a data structure in which each parent node can have
two children.

Each node of a binary tree consists of three items: a data item, address to the left
child, and then, address to the right child. Essentially, a node, and then, two child nodes,
left and right. Of course, there are gonna be different types of tree setups that are
binary, because we can have multiple combinations of different parent nodes to
one another.

One commonly referred to binary tree type is a “full binary tree”, which is a
special type of binary tree, in which every parent node or internal node has either
two or no children. There’s also a “perfect binary tree”, in which every internal node
has exactly two children nodes, and all the leaf nodes, otherwise known as external
nodes, are at the same level, they’re parallel.

6
Lesson Transcript The Most Used Data Structures

Now, what does this mean, “level”? When you start with your root, and you start breaking
down the tree, and you start linking more and more, down to more nodes further on,
you’ll notice that, as we go down, you kind of make a pyramid. You could refer to
these different hierarchies as “levels”.

So, again, a “perfect binary tree” is... every internal node has exactly two children and
they’re all on the same level. There’s not one leaf or… I’m sorry… one external node on
the bottom of, say, a three-level decision tree, there’s not a fourth level where one
node sits by itself.

And then, there’s a “complete binary tree”, which is like a “full binary tree” with two
major differences: every level must be completely filled; and all the leaf elements
(external nodes) must lean towards the left.

Lastly, we should discuss what kind of operations we can do in binary trees, because
we can do a few things when it comes to decision trees. Typical and most common
operations include insertion and deletion, which sound pretty self-explanatory.

Essentially, insertion is nodes that can be inserted into the binary tree between two
other nodes or added after a leaf node (again, that external node, the last one); and
deletion is, again, the process whereby a node is removed from the tree, and
only certain nodes in a binary tree can be removed unambiguously.

7
Lesson Transcript The Most Used Data Structures

The final advanced type of data structure we’ll be discussing is kind of an


extension off of the binary tree. This tree, not to be confused, is called the
“B-tree”. It’s a self-balancing tree data structure that maintains sorted data and allows
searches, sequential access, insertions, and deletions in a logarithmic time.

B-trees generalize the binary search tree, allowing for nodes with more than
just two children. Unlike other self-balancing binary trees, the B-tree is well
suited for storage systems that read and write relatively large blocks of data, and you’ll
see B-trees commonly used in data systems, databases, data managing software,
and even in filing systems.

What makes B-trees more useful and even gives them an advantage over other types
of tree methodologies and Data Structures, (is) that B-trees and databases keep
keys in a sorted order for sequential traversing; it also uses a hierarchical
index to minimize the number of disk reads; and it keeps the index balanced with a
recursive algorithm, meaning, it constantly goes back through itself to the beginning
and reiterates this every time.

You could see now the advantages of how these B-trees can be, again, a little complex,
but yet so efficient and reliable in terms of data storage and data management.

8
Transcript + Translation The Most Used Data Structures

English Português

Today we’re gonna be discussing Data Hoje nós vamos discutir Estruturas de
Structures. Now, what exactly are Data Dados. Agora, o que exatamente são
Structures? Well, a data structure is Estruturas de Dados? Bem, uma estrutura
technically a named location that could be de dados é tecnicamente uma localização
used to store organized data. nomeada que pode ser usada para
armazenar dados organizados.

We’re gonna be talking about a lot Nós vamos falar sobre muitos tipos

of different types of Data Structures, diferentes de Estruturas de Dados, desde

from most basic to more advanced tipos mais básicos até mais avançados.

types. You’re gonna come across a lot Você vai encontrar muitos tipos diferentes

of different types of Data Structures, de Estruturas de Dados, e é bom ser bem

and it’s good to be well versed in just versado em basicamente todos os tipos de

about every type of form you could see, forma que você possa ver, especialmente

especially the basic ones. as básicas.

9
Transcript + Translation The Most Used Data Structures

English Português

We’ll be discussing the first data Nós vamos discutir a primeira estrutura
structure, called a “stack”. Now, this is de dados, chamada de uma “pilha”. Agora,
one of the most commonly referred to essa é uma das estruturas de dados mais
and known data structure. It is a linear comumente referidas e conhecidas. É
data structure that follows the principle uma estrutura de dados linear que segue
of “Last In, and First Out”, this means that o princípio de “Último a entrar, e Primeiro
the last elements inserted inside a a Sair”, isso significa que o último elemento
stack is removed first. inserido dentro de uma pilha é removido
primeiro.

You could think of the “stack” Data Você poderia pensar na Estrutura de
Structure as a pile of plates, all on top Dados “pilha” como uma pilha de pratos,
of one another. Though simple, stacks todos uns em cima dos outros. Embora
are incredibly powerful, and they’re simples, as pilhas são incrivelmente
most commonly used in compilers, and poderosas, e elas são mais comumente
even in memory caches, where URLs can usadas em compiladores, e até mesmo em
be saved when you’re jumping between caches de memória, onde URLs podem
different hyperlinks. ser salvas quando você está pulando
entre diferentes hiperlinks.

10
Transcript + Translation The Most Used Data Structures

English Português

Now, talking about stacks, we also… also Agora, falando sobre pilhas, nós também...
need to know about “queues”. A queue também precisamos saber sobre “filas”.
is a data structure that follows the same Uma fila é uma estrutura de dados que
kind of linear format, but instead of using segue o mesmo tipo de formato linear, mas
“Last In, First Out”, it uses the “First In, em vez de usar “Último a Entrar, Primeiro
First Out” methodology. Essentially, the a Sair”, usa a metodologia “Primeiro a
first one in (in, say, a line, here) is gonna Entrar, Primeiro a Sair”. Essencialmente, o
be, then, the first one out when the next primeiro a entrar (em, digamos, uma fila,
one comes in. aqui) será, daí, o primeiro a sair quando o
próximo entrar.

Think of a line for a hot dog stand. You Pense em uma fila para uma barraca de
will have customers waiting as you cachorro-quente. Você vai ter clientes
serve others. The people waiting are esperando enquanto você atende os outros.
in a queue per se, and queuing data As pessoas esperando estão em uma fila
structures can be used in this application, per se, e estruturas de dados de filas podem
where you can try to find optimal serving ser usadas nessa aplicação, onde você pode
times. Moreover, you could even use it tentar encontrar os tempos de atendimento
for CPU scaling applications and, again, ideais. Além disso, você pode até mesmo
ticket services, such as movie theaters. usá-la para aplicações de dimensionamento
de CPU e, novamente, serviços de ingressos,
como cinemas.
11
Transcript + Translation The Most Used Data Structures

English Português

Moving on to another data structure... is Passando para outra estrutura de dados


“lists”, and everyone is pretty familiar with ... é “listas”, e todo mundo está bastante
lists, but in this instance, Data Structures, familiarizado com listas, mas nesse caso,
when it comes to lists, there are several Estruturas de Dados, quando se trata de
categories of lists. A Linked List is a listas, existem várias categorias de listas.
linear data structure that includes a series Uma Lista Ligada é uma estrutura de
of connected nodes. Here, each node dados linear que inclui uma série de nós
stores the data and address of the next conectados. Aqui, cada nó armazena os
node linked to it. dados e endereço do próximo nó ligado
a ele.

Linked Lists can be of multiple types: Listas Ligadas podem ser de vários
they can be singly linked lists, doubly, tipos: elas podem ser listas ligadas
and circular linked lists, and lists are individualmente, duplamente e listas
very common in today’s programming ligadas circulares, e listas são muito
languages, such as Python, which even comuns nas linguagens de programação
utilizes dictionaries, and Java, C, C+. de hoje, como Python, que até utiliza
dicionários, e Java, C, C+.

12
Transcript + Translation The Most Used Data Structures

English Português

But the last data structure I’d like to Mas a última estrutura de dados que eu
discuss, and more in basic, relative terms, gostaria de discutir, e mais em termos
is a hash table. Hash tables take a básicos, relativos, é uma tabela hash.
new index by processing it using keys. Tabelas hash pegam um novo índice
The element corresponding to that key is processando-o usando chaves. O
stored in the overall index. elemento correspondente a essa chave é
armazenado no índice geral.

Essentially, hash tables are Data Essencialmente, tabelas hash são


Structures that store elements in a “key- Estruturas de Dados que armazenam
value” pair. You could think of this as, like, elementos em um par “chave-valor”. Você
a “row to column”, or a “observation to pode pensar nisso como, tipo, um tipo
variable” kind of pairing, where the key de pareamento de “linha para coluna”, ou
is a unique integer that is used to store “observação para variável”, onde a chave
for indexing the value, and the value is é um número inteiro único que é usado
the data. para armazenar para indexar o valor, e o
valor são os dados.

13
Transcript + Translation The Most Used Data Structures

English Português

In hash tables, you’re gonna be Em tabelas hash, você vai ter que lidar
having to deal with hash functions, com funções hash, e essas funções hash
and these hash functions sometimes às vezes podem gerar múltiplas chaves
may generate multiple keys for, say, the para, digamos, o mesmo índice, e isso vai
same index, and this will be a conflicts ser um conflito dentro da sua tabela hash.
within your hash table. This is called Isso é chamado de “colisão hash”, é muito
a “hash collision”, it’s very common, and comum, e existem muitas metodologias
there’s a lot of methodologies to go para proceder em tentar resolver isso.
about trying to solve this.

One of them is called “chaining”, it’s a Uma delas é chamada de “encadeamento”,


hash function that produces the same é uma função hash que produz o mesmo
index by using multiple elements, índice usando múltiplos elementos,
and these elements are stored in the e esses elementos são armazenados
same index by using a doubly linked no mesmo índice usando uma lista
list. So, instead of having one node, duplamente ligada. Então, em vez de ter
there’s two. um nó, existem dois.

14
Transcript + Translation The Most Used Data Structures

English Português

Now, let’s discuss a more advanced type of Agora, vamos discutir um tipo mais
Data Structure, which is “trees”, decision avançado de Estrutura de Dados, que
trees. These previous data structures são “árvores”, árvores de decisão. Essas
that we were just talking about: lists, estruturas de dados anteriores sobre as
stacks, queues, hash tables, they’re all quais nós estávamos falando há pouco:
examples of linear data structures that listas, pilhas, filas, tabelas hash, elas
store data sequentially. But in order são todas exemplos de estruturas de
to perform any operation in a linear dados lineares que armazenam dados
data structure, the time complexity sequencialmente. Mas para realizar
increases with the increase in the data qualquer operação em uma estrutura de
size. dados linear, a complexidade de tempo
aumenta com o aumento no tamanho
dos dados.

15
Transcript + Translation The Most Used Data Structures

English Português

In today’s modern time, this can be very Nos tempos modernos de hoje, isso
computationally taxing, but different pode ser muito desgastante em
tree Data Structures allow quicker termos computacionais, mas diferentes
and easier access to the data, as if it Estruturas de Dados de árvore permitem
was non-linear. Now, a decision tree is um acesso mais rápido e mais fácil aos
composed entirely out of nodes and dados, como se eles fossem não lineares.
edges. A node is an entity that contains Agora, uma árvore de decisão é composta
a key or value and points to child nodes, inteiramente de nós e arestas. Um nó é
nodes underneath it. So, the top node is uma entidade que contém uma chave ou
usually referred to as the “root node”, valor e aponta para nós filhos, nós abaixo
the topmost, and beneath it are gonna dele. Então, o nó superior é geralmente
be child nodes. referido como o “nó raiz”, o mais alto, e
abaixo dele vão estar nós filhos.

Now, what connects these nodes is Agora, o que conecta esses nós é algo
something called an “edge”. Edges can chamado de uma “aresta”. Arestas podem
connect any two nodes, and overall, conectar quaisquer dois nós, e no geral,
nodes are commonly referred to as os nós são comumente referidos como
“child nodes”, but also “internal” or “nós filhos”, mas também nós “internos”
“external” nodes, where the external ou “externos”, onde o nó externo é o
node is the last and final node at the último e derradeiro nó no final da árvore,
end of the tree, of the path; and internal do caminho; e nós internos são aqueles
nodes are the ones that connect to at que se conectam a pelo menos um filho,
least one child, one or more. um ou mais.
16
Transcript + Translation The Most Used Data Structures

English Português

Now, decision trees, again, have a lot Agora, árvores de decisão, novamente,
of capabilities and a lot of different types têm muitos recursos e muitos tipos
of structures within them. There’s a lot diferentes de estruturas dentro delas,
of different types. One very, very existem muitos tipos diferentes. Um que
common, and always referred to, and é muito, muito comum, e sempre referido,
I’ve used it so many times at this e eu o usei tantas vezes neste ponto na
point in my career, is a binary tree. minha carreira, é uma árvore binária. A
Binary tree is a data structure in which árvore binária é uma estrutura de dados
each parent node can have two children. na qual cada nó pai pode ter dois filhos.

Each node of a binary tree consists of Cada nó de uma árvore binária consiste em
three items: a data item, address to the três itens: um item de dados, endereço para
left child, and then, address to the right o filho esquerdo, e então, endereço para o
child. Essentially, a node, and then, two filho direito. Essencialmente, um nó, e aí,
child nodes, left and right. Of course, dois nós filhos, esquerdo e direito. Claro,
there are gonna be different types of tree haverá diferentes tipos de configurações
setups that are binary, because we can de árvores que são binárias, porque nós
have multiple combinations of different podemos ter múltiplas combinações de
parent nodes to one another. nós pais diferentes entre si.

17
Transcript + Translation The Most Used Data Structures

English Português

One commonly referred to binary Um tipo de árvore binária comumente


tree type is a “full binary tree”, which referido é uma “árvore binária cheia”, que
is a special type of binary tree, in which é um tipo especial de árvore binária, na
every parent node or internal node qual cada nó pai ou nó interno ou tem
has either two or no children. There’s dois ou nenhum filho. Existe também uma
also a “perfect binary tree”, in which every “árvore binária perfeita”, na qual cada nó
internal node has exactly two children interno tem exatamente dois nós filhos, e
nodes, and all the leaf nodes, otherwise todos os nós folha, também conhecidos
known as external nodes, are at the same como nós externos, estão no mesmo
level, they’re parallel. nível, eles estão paralelos.

Now, what does this mean, “level”? When Agora, o que isso significa, “nível”? Quando
you start with your root, and you start você começa com a sua raiz, e você começa
breaking down the tree, and you start a analisar a árvore, e começa a conectar
linking more and more, down to more mais e mais, abaixo para mais nós mais
nodes further on, you’ll notice that, adiante, você vai notar que, conforme
as we go down, you kind of make a nós descemos, você meio que faz uma
pyramid. You could refer to these different pirâmide. Você pode se referir a essas
hierarchies as “levels”. diferentes hierarquias como “níveis”.

18
Transcript + Translation The Most Used Data Structures

English Português

So, again, a “perfect binary tree” is... every Então, novamente, uma “árvore binária
internal node has exactly two children perfeita” é... cada nó interno tem
and they’re all on the same level. There’s exatamente dois filhos e eles estão todos
not one leaf or… I’m sorry… one external no mesmo nível. Não existe uma folha
node on the bottom of, say, a three-level ou... me desculpe... um nó externo na
decision tree, there’s not a fourth level parte inferior de, digamos, uma árvore
where one node sits by itself. de decisão de três níveis, não existe um
quarto nível onde um nó esteja sozinho.

And then, there’s a “complete binary E aí, existe uma “árvore binária completa”,
tree”, which is like a “full binary tree” que é como uma “árvore binária cheia”
with two major differences: every level com duas diferenças principais: cada nível
must be completely filled; and all the leaf deve estar completamente preenchido; e
elements (external nodes) must lean todos os elementos folha (nós externos)
towards the left. devem se inclinar para a esquerda.

19
Transcript + Translation The Most Used Data Structures

English Português

Lastly, we should discuss what kind of Por último, nós devemos discutir que tipo
operations we can do in binary trees, de operações nós podemos fazer em
because we can do a few things when árvores binárias, porque nós podemos
it comes to decision trees. Typical fazer algumas coisas quando se trata de
and most common operations include árvores de decisão. As operações típicas e
insertion and deletion, which sound pretty mais comuns incluem inserção e exclusão,
self-explanatory. que soam bastante autoexplicativas.

Essentially, insertion is nodes that can be Essencialmente, inserção é nós que


inserted into the binary tree between podem ser inseridos na árvore binária
two other nodes or added after a leaf entre dois outros nós ou adicionados
node (again, that external node, the last depois de um nó folha (novamente,
one); and deletion is, again, the process aquele nó externo, o último); e exclusão
whereby a node is removed from the é, novamente, o processo pelo qual um
tree, and only certain nodes in a binary nó é removido da árvore, e apenas certos
tree can be removed unambiguously. nós em uma árvore binária podem ser
removidos sem ambiguidade.

20
Transcript + Translation The Most Used Data Structures

English Português

The final advanced type of data O último tipo avançado de estrutura de


structure we’ll be discussing is kind dados que nós vamos discutir é meio que
of an extension off of the binary uma extensão a partir da árvore binária.
tree. This tree, not to be confused, is Essa árvore, não deve ser confundida
called the “B-tree”. It’s a self-balancing com as outras, é chamada de “árvore
tree data structure that maintains sorted B”. É uma estrutura de dados de árvore
data and allows searches, sequential auto-balanceada que mantém dados
access, insertions, and deletions in a classificados e permite pesquisas, acesso
logarithmic time. sequencial, inserções e exclusões em um
tempo logarítmico.

B-trees generalize the binary search Árvores-B generalizam a árvore de


tree, allowing for nodes with more pesquisa binária, possibilitando nós
than just two children. Unlike other com mais do que apenas dois filhos.
self-balancing binary trees, the B-tree Diferentemente de outras árvores binárias
is well suited for storage systems that auto-balanceadas, a árvore-B é adequada
read and write relatively large blocks of para sistemas de armazenamento
data, and you’ll see B-trees commonly que leem e escrevem blocos de dados
used in data systems, databases, data relativamente grandes, e você vai ver
managing software, and even in filing árvores-B comumente usadas em
systems. sistemas de dados, bancos de dados,
software de gerenciamento de dados e
até mesmo em sistemas de arquivamento.
21
Transcript + Translation The Most Used Data Structures

English Português

What makes B-trees more useful and O que faz as árvores-B mais úteis e até
even gives them an advantage over mesmo dá a elas uma vantagem sobre
other types of tree methodologies and outros tipos de metodologias de árvores
Data Structures, (is) that B-trees and e Estruturas de Dados, (é) que árvores-B
databases keep keys in a sorted order e bancos de dados mantêm as chaves em
for sequential traversing; it also uma ordem classificada para percurso
uses a hierarchical index to minimize sequencial; ela também usa um índice
the number of disk reads; and it keeps hierárquico para minimizar o número de
the index balanced with a recursive leituras de disco; e ela mantém o índice
algorithm, meaning, it constantly goes balanceado com um algoritmo recursivo,
back through itself to the beginning and ou seja, elas retorna constantemente
reiterates this every time. através de si mesma até o início e reitera
isso todas as vezes.

You could see now the advantages of Você pôde ver agora as vantagens
how these B-trees can be, again, a de como essas árvores-B podem ser,
little complex, but yet so efficient and novamente, um pouco complexas, mas
reliable in terms of data storage and ainda assim tão eficientes e confiáveis em
data management. termos de armazenamento de dados e
gerenciamento de dados.

22
Vocabulary The Most Used Data Structures

Data Structure referred to


Estrutura de Dados. No contexto de Referido. Pode ser usado com “as”
Ciência da Computação, uma Estrutura para indicar que algo “é referido como
de Dados é uma coleção de valores de (algo)”, ou seja, a maneira pela qual
dados, as relações entre eles e as funções as pessoas se referem a essa coisa.
ou operações que podem ser aplicadas Porém, diferentemente do português,
aos dados, como uma “pilha”, uma “fila”, essa estrutura também pode ser usada
uma “lista”, etc. “sozinha”, geralmente com o sentido de
“considerado” ou “mencionado”.
to store
stack
Armazenar.
Pilha, no sentido de uma pilha de pratos,
data ou também a Estrutura de Dados “pilha”.
Não é a pilha de colocar no controle
Diferentemente do português, em inglês remoto.
a palavra “data” é incontável, ou seja,
seria errado dizer coisas como “datas”,
compiler
“one data” ou “many data”. Usaremos
“data” tanto para traduzir a palavra “dado” Compilador.
quanto “dados”.
memory cache
gonna
Cache de memória.
Abreviação de “going to”, muito usada na
fala. queue
Fila, no sentido de uma fila na qual
to come across (something)
você espera para entrar em algum
Encontrar (algo), deparar-se com (algo). lugar (sinônimo de “line”), ou também a
Estrutura de Dados “fila”.
to be well versed in (something)
optimal
Ser bem versado em (algo), ou seja,
aquela atividade é algo sobre o que você Ótimo, ideal.
tem muito conhecimento ou faz bem.

23
Vocabulary The Most Used Data Structures

…, say, … list
Assim como “let’s say”, essa versão Lista, no sentido de uma lista de coisas a
abreviada “say” é usada quando fazer, ou também a Estrutura de Dados
queremos dar um exemplo de algo. “lista”.
Podemos traduzir como “digamos”.
when it comes to (something)
(a) stand
No que diz respeito a (algo), quanto a
Como substantivo, é um “estande”, uma (algo), no que toca a (algo).
“barraca” ou um “carrinho”, desses que
vendem comida e outras coisas nas ruas. Linked List
Lista Ligada. No contexto de Ciência da
queuing
Computação, é uma estrutura de dados
Vem da palavra “queue” (fila), mas aqui composta por vários nós interligados
a vimos como um adjetivo na expressão através de ponteiros, ou seja, cada
“queuing data structures”, que significa elemento possui um ponteiro que aponta
“estruturas de dados de fila”, ou seja, “do para o endereço de memória do próximo.
tipo fila”.
node
serving time
Nó, elemento.
Nesse contexto, indica o “tempo de
atendimento” por pessoa. address

scaling Endereço.

Dimensionamento, algo que promove


linked
escalabilidade.
Ligado, conectado, vinculado.
to move on
Seguir adiante, ir em frente.

24
Vocabulary The Most Used Data Structures

hash table to index


Tabela hash, tabela de dispersão. No Indexar.
contexto de Ciência da Computação,
é uma estrutura de dados que associa hash function
chaves a valores. O seu objetivo é, a partir
de uma chave simples, fazer uma busca Função hash. É um algoritmo que mapeia
rápida e obter o valor desejado. dados de comprimento variável para
dados de comprimento fixo, geralmente
associado a tabelas hash.
index
Índice. to go about (doing something)

overall Proceder em (fazer algo), começar a (fazer


algo), ocupar-se em (fazer algo). O verbo
Como advérbio, significa “em geral”, “como que vem depois estará na forma “-ing”.
um todo”. Vimos também ela sendo usada
como adjetivo na frase “overall index”, que chaining
podemos traduzir como “índice geral”.
Encadeamento. No contexto de tabelas
hash, é um método para resolver colisões
“key-value” pair
hash. Ele basicamente armazena na
Par “chave-valor”. tabela informações sobre onde o próximo
registro deve ser buscado.
row
tree, decision tree
Palavra que podemos traduzir como
“linha”, assim como “line”. Porém, “row” Árvore, árvore de decisão.
é usada geralmente em relação a uma
tabela, onde temos “rows” (linhas) e to perform
“columns” (colunas).
Quando usado como verbo transitivo com
um objeto direto, geralmente traduzimos
pairing
como “realizar (alguma ação)”. Porém,
Pareamento. quando usado como verbo intransitivo,
sem nenhum objeto (como na frase
integer “(something) is performing well/badly”),
aí costumamos traduzi-lo como “estar
(Número) inteiro. desempenhando bem/mal”.

25
Vocabulary The Most Used Data Structures

taxing final
Desgastante. Como adjetivo, significa “último” ou
“derradeiro”.
computationally taxing
binary
Desgastante em termos computacionais.
Binário.
underneath
Essa palavra significa “embaixo” ou “sob” e
binary tree
é quase um sinônimo da palavra “under”. Árvore binária. No contexto de Ciência da
Porém, ela é um pouco mais específica, Computação, é uma estrutura de dados
geralmente indicando que a coisa que na qual cada nó tem no máximo dois
está embaixo da outra está coberta, não filhos, chamados de filho esquerdo e filho
sendo possível vê-la. direito.

root parent node


Raiz. Nó pai. O nó imediatamente superior a
determinado elemento em uma árvore.
beneath
Também é um sinônimo de “under” e (a) setup
“underneath”, mas é uma palavra mais Configuração.
formal, literária.
leaf node
child node
Nó folha. Os nós externos, aqueles
Nó filho. O nó imediatamente inferior que não possuem filhos e são os mais
a um determinado elemento em uma inferiores em uma árvore.
árvore.
further on
edge
Mais adiante.
Em um contexto de grafos, é traduzida
como “aresta”. Porém, também pode
hierarchy
significar “borda” ou “limite”.
Hierarquia.

26
Vocabulary The Most Used Data Structures

by (+ reflexive pronoun) sequential access


Quando usamos a preposição “by” com Acesso sequencial.
um pronome reflexivo (“by myself”,
“by yourself”, “by themselves”, etc.), isso logarithmic time
pode ser traduzido de maneira mais geral
como “por conta própria”, ou então algo Tempo logarítmico.
como “eu mesmo”, “você mesmo” ou “eles
mesmos”. to allow for (something)
Permitir, possibilitar, “planejar”, “deixar
major disponível”.
Como adjetivo, significa algo como
“grande”, “principal”, “importante”.
unlike (something)
Diferentemente de (algo), ao contrário de
to lean (algo).

Inclinar-se, apoiar-se.
well suited for (something)
self-explanatory Bem adequado para (algo).

Autoexplicativo.
database
unambiguously Banco de dados, base de dados.

(De maneira) sem ambiguidade.


data managing software
B-tree Software de gerenciamento de dados.

Árvore-B.
sequential traversing
sorted O ato de realizar um percurso sequencial,
ou seja, de percorrer alguma estrutura de
Ordenado, classificado.
dados de maneira sequencial.

search
hierarchical
Busca, pesquisa.
Hierárquico.

27
Vocabulary The Most Used Data Structures

disk read …, meaning, …


Leitura de disco. Significa literalmente “significando”, mas
geralmente traduzimos como “ou seja”,
balanced para quando queremos explicar algo mais
a fundo.
Equilibrado, balanceado.

recursive to reiterate
Reiterar, no sentido de “iterar” novamente,
Recursivo.
repetir.

algorithm
data storage
Algoritmo.
Armazenamento de dados.

data management
Gerenciamento de dados.

28
Grammar The Most Used Data Structures

we’re gonna be discussing Data Structures

Acima vemos o tempo verbal Future Continuous, que é usado para


falar sobre alguma coisa que estará ocorrendo no futuro, por si
mesma ou simultânea a outra ação. Ele é formado usando:

“will be” ou “going to be” + verbo principal na forma “-ing”

Porém, ele também é muito usado simplesmente como um


sinônimo do Futuro simples, o que causa um problema comum
em português: o gerundismo, que é o uso do gerúndio para falar
sobre o futuro onde o mesmo não era necessário, geralmente uma
tradução direta do Future Continuous do inglês, muito usado por
empresas de telemarketing.

Como exemplo, a frase “Eu vou te mandar os documentos em


breve” pode ser expressa em inglês usando o Futuro simples (“I’ll
send you the documents soon”), mas também seria correta no
Future Continuous (“I’ll be sending you the documents soon”). Já em
português, seria considerado gerundismo o uso da frase “Eu vou
estar te mandando os documentos em breve”.

29
Grammar The Most Used Data Structures

Outros exemplos do Future Continuous que vimos nesta aula:


• We’re gonna be talking about a lot of different types of Data
Structures
• We’ll be discussing the first data structure
• you’re gonna be having to deal with hash functions
• The final advanced type of data structure we’ll be discussing

...a pile of plates, all on top of one another.

A expressão “one another” é sinônima de “each other”, e podemos


traduzi-las geralmente como “um ao outro” ou “uns aos outros”. Na
frase acima, por causa da preposição “of” (de), o sentido muda um
pouco e fica “um do outro”, e faz sentido com o resto da frase, que
diz que em uma pilha de pratos, eles estão todos em cima uns dos
outros.

Though simple, stacks are incredibly powerful

A palavra “though” pode ser usada em diferentes contextos com


diferentes funções sintáticas. Aqui, ela é usada como conjunção
com o sentido de “embora”, “apesar de”, e a oração seguinte
indicará um contraste.

30
Grammar The Most Used Data Structures

You will have customers waiting as you serve others.

A palavra “as” pode ter muitas traduções e usos diferentes, mas


note o uso dela nessa frase. Ela está sendo usada como conjunção,
e pode ser traduzida como “enquanto”, “quando”, “conforme”.

Outra frase que vimos na aula com “as” foi:


• You’ll notice that, as we go down...

Hash tables take a new index by processing it using keys.

Usamos a preposição “by” com um verbo na forma “-ing” para dizer


o método ou a maneira pela qual algo é feito.

• Como tabelas hash pegam um novo índice? (How do hash


tables take a new index?)
• Processando-o usando chaves. (By processing it using keys.)

Em português, usaríamos apenas o gerúndio, sem nenhuma


preposição.

31
Grammar The Most Used Data Structures

...is used to store for indexing the value.

Quando usamos um verbo depois de uma preposição (como “for”


acima), ele sempre estará na forma “-ing”. Por isso o verbo “to
index” se transforma em “for indexing”. Outros exemplos:
• I thought of going there.
• He’s thinking about leaving.

It’s a hash function that produces the same index by using


multiple elements.

Vemos novamente o uso da preposição “by” com um verbo na


forma “-ing” para dizer o método ou a maneira pela qual algo é
feito.

• Como essa função hash produz o mesmo índice? (How does


this hash function produce the same index?)
• Usando múltiplos elementos. (By using multiple elements.)

32
Grammar The Most Used Data Structures

These elements are stored in the same index by using


a doubly linked list.

Vemos novamente o uso da preposição “by” com um verbo na


forma “-ing” para dizer o método ou a maneira pela qual algo é
feito.

• Como esses elementos são armazenados no mesmo índice?


(How are these elements stored in the same index?)
• Usando uma lista duplamente ligada. (By using a doubly linked
list.)

These previous data structures that we


were just talking about…

Diferentemente do português, em inglês é correto e muito comum


terminar certas frases com preposições. Para dizer que falamos
sobre algo, usamos “to talk about (something)”.
Assim, seria correto dizer essa mesma frase com a preposição no
meio, como em português: “These previous data structures about
which we were just talking”, mas isso pode soar um pouco formal
demais ou não natural. Dessa forma, na fala é mais comum usar a
forma com a preposição no final: “These previous data structures
that we were just talking about”.

33
Grammar The Most Used Data Structures

In order to perform any operation in a linear data structure,


the time complexity increases...

A estrutura “in order to” indica a finalidade de algo, e podemos


traduzir como “para” ou “a fim de”. Mais exemplos:
• He worked hard in order to support his family. (Ele trabalhou
duro para/a fim de sustentar a sua família.)
• I did that in order to survive. (Eu fiz aquilo para sobreviver.)

A decision tree is composed entirely out of nodes and edges.

Para dizer de que algo foi feito, podemos usar a estrutura “to be
made out of (something)” ou “to be composed out of (something)”,
geralmente para indicar que algo maior foi feito de coisas menores,
ou quando houve alguma transformação. Podemos traduzir como
“ser feito de (algo)” ou “ser composto de (algo)”.

...the “root node”, the topmost…

Essa estrutura “the topmost” pode parecer estranha em português,


mas em inglês é muito comum usar o superlativo “most” como
sufixo um adjetivo de posição para indicar que aquilo é “o mais”
extremo naquela posição. Assim, temos “the topmost”, “the
bottommost”, “the leftmost”, etc.

34
Grammar The Most Used Data Structures

Different tree Data Structures allow quicker and easier


access to the data, as if it was non-linear.

Algo que vem desaparecendo no inglês é o uso do subjuntivo,


porém, ele ainda é usado em determinadas situações, como para
falar de desejos com o verbo “to wish”, ou também junto com o “if”
para falar de situações irreais ou hipóteses.

Para o verbo “to be”, por exemplo, usamos a forma “were” para
todas as conjugações, mesmo as que usam “was” no Simple Past.
Exemplos:

• I would go if I were younger. (Eu iria se eu fosse mais jovem.)


• I wish I were richer. (Eu queria ser mais rico.)

Porém, por ser algo que vem desaparecendo, muitos falantes


nativos de inglês não usam essa forma, usando a conjugação
“normal” com o “was”, principalmente na fala mais informal. Isso é
algo que alguns gramáticos podem considerar incorreto, mas que
hoje em dia já é considerado aceitável devido ao seu amplo uso
pela população.

Nesta frase acima, como se trata de uma situação irreal, o mais


correto seria usar o subjuntivo e dizer “as if it were non-linear”,
porém o instrutor usou “was”.

35
Grammar The Most Used Data Structures

Internal nodes are the ones that


connect to at least one child.

A palavra “one” geralmente é aprendida como tradução do número


1, mas além disso, ela também pode ser usada para substituir uma
pessoa ou elemento, inclusive, usando a forma “ones” se tratar-se
de mais de uma pessoa ou elemento. Em português, geralmente
diríamos “Nós internos são aqueles que...”, já em inglês, podemos
usar “the ones” nesse contexto.

...combinations of different parent nodes to one another.

Vemos novamente a expressão “one another”, que pode ser


traduzida geralmente como “um ao outro” ou “uns aos outros”. Na
frase acima, por causa da preposição “to” (para, a), o sentido muda
um pouco e fica “um ao outro”, “uns aos outros” ou “entre si”.

One commonly referred to binary


tree type is a “full binary tree”.

Já vimos a expressão “referred to” na seção Vocabulary, e seu uso


pode parecer estranho em português se quisermos traduzir a
frase literalmente. Uma maneira mais natural de traduzir essa frase
seria: “Um tipo de árvore binária comumente referido/mencionado
é...”, ignorando a preposição “to”.

36
Grammar The Most Used Data Structures

I’ve used it so many times at this point in my career.

Nessa frase vemos o uso do tempo verbal Present Perfect. Ele é


formado usando:

verbo “to have” como auxiliar + verbo principal no Past Participle

Para o verbo “to use” (usar), que é regular, a forma no Simple


Past e no Past Participle é “used”. Assim, obtemos “I have used” ou,
abreviando, “I’ve used”.

Esse tempo verbal é usado em algumas situações, mas como o


próprio nome diz, tem a ver com algo que ocorreu no passado,
mas que ainda tem alguma relação com o presente. Na frase
acima, vemos essa relação com o presente na expressão “at this
point in my career”, vemos que se refere a uma experiência que
começou no passado e foi sendo acumulada com o tempo até o
presente, até o momento atual.

37
Grammar The Most Used Data Structures

...where one node sits by itself.

O verbo “to sit” em inglês significa “sentar-se” ou “estar sentado”,


mas ele pode ser usado também para indicar simplesmente a
posição de algo, que traduziríamos como “estar” ou ‘ficar”.

Além disso, já vimos o uso da preposição “by” com um pronome


reflexivo na seção Vocabulary.

Deletion is, again, the process whereby a node is removed


from the tree.

A palavra “whereby” é mais avançada, e é uma maneira mais


formal de dizer “by which”, ou seja, traduzimos como “pelo(a) qual”,
“através do(a) qual”.

...is kind of an extension off of the binary tree.

A estrutura “off of” é muito comum no inglês norte-americano, mas


pode ser considerada incorreta no inglês britânico, dependendo
do contexto. Aqui, também seria correto usar apenas “...an
extension of the binary tree”, mas o uso do “off of” passa a ideia de
que é algo que está se originando da árvore (como um galho).

38
Grammar The Most Used Data Structures

B-trees generalize the binary search tree, allowing for nodes


with more than just two children.

Como vimos na seção Vocabulary, o phrasal verb “to allow for” tem
um significado um pouco diferente de “to allow”, apesar de ambas
poderem ter a mesma tradução. Enquanto que “to allow” significa
“permitir” no sentido de dar uma permissão, uma causa e efeito; “to
allow for” significa “permitir” no sentido de “possibilitar”, “planejar”,
“deixar disponível”. Exemplo:
• The design of the system allows for easy upgrades. (O design
do sistema permite/possibilita melhorias fáceis.)

B-trees can be, again, a little complex, but yet so efficient.

Tanto “but” quanto “yet” são conjunções usadas para indicar


um contraste ou contradição em relação à oração anterior,
então usá-las juntas é considerado por muitos redundante e até
incorreto, mas é algo usado por muitos falantes nativos e até
por Shakespeare em uma de suas obras. De qualquer forma,
recomendamos que em frases desse tipo, você use apenas “but”,
apenas “yet”, ou então “and yet”.

39
Mistakes The Most Used Data Structures

Em outras aulas temos professores que não são falantes nativos de inglês,
porém, nesta aula, tivemos um falante nativo, mas que mesmo assim comete
alguns errinhos, assim como nós cometemos eventualmente em português.
Isso pode te mostrar que é possível ser extremamente fluente em inglês, a
nível de trabalhar e fazer apresentações no idioma, e mesmo assim cometer
pequenos errinhos.

Nesta seção, vamos explicar quais foram esses errinhos cometidos durante a
aula e como corrigi-los.

this is one of the most commonly referred to and known


data structure
Frase correta: this is one of the most commonly referred to and known data
structures

Explicação: Faltou o “s” do plural na pronúncia de “data structures”.

the last elements inserted inside a stack is removed first


Frases corretas:
• the last element inserted inside a stack is removed first
• the last elements inserted inside a stack are removed first

Explicação: Ambas as frases fazem sentido, mas temos que ser coerentes - ou usamos
“element” e “is” no singular, ou “elements” e “are” no plural.

C+
Frase correta: C++

Explicação: O nome da linguagem é C plus plus, com dois sinais de adição. O instrutor
pode ter feito simplesmente uma abreviação do nome também.

40
Mistakes The Most Used Data Structures

a “observation to variable” kind of pairing


Frase correta: an “observation to variable” kind of pairing

Explicação: Como a próxima palavra começa em som de vogal, o correto seria usar o
artigo indefinido “an”. O instrutor provavelmente mudou sua linha de pensamento no
meio da frase.

this will be a conflicts within your hash table


Frase correta: this will be a conflict within your hash table

Explicação: A frase está no singular, então o correto é “a conflict”.

there’s a lot of methodologies


Frase correta: there are a lot of methodologies

Explicação: Tanto “a lot” quanto “methodologies” pedem uma conjugação no plural, por
isso precisamos do “there are” também no plural, mas é um erro muito comum na fala,
mesmo entre nativos.

instead of having one node, there’s two


Frase correta: instead of having one node, there are two

Explicação: Como temos “two” no plural, precisamos da conjugação “there are” também
no plural, mas é um erro muito comum na fala, mesmo entre nativos.

There’s a lot of different types. One very, very common...


Frase correta: There are a lot of different types. One that’s very, very common...

Explicação: Tanto “a lot” quanto “types” pedem uma conjugação no plural, por isso
precisamos do “there are” também no plural, mas é um erro muito comum na fala,
mesmo entre nativos.

Além disso, é mais correto o uso de um verbo depois de “one”, em vez de seu uso
sozinho. Por isso, é melhor usar “one that is…”.

41
Mistakes The Most Used Data Structures

This tree, not to be confused, is called the “B-tree”.


Frase correta: This tree, not to be confused with other ones, is called the “B-tree”.

Explicação: A frase “not to be confused” é usada para fazer uma comparação com
outra coisa, por isso é mais natural adicionar o “with” e essa comparação. O instrutor
provavelmente mudou sua linha de pensamento no meio da frase.

B-trees and databases keep keys in a sorted order for sequential


traversing; it also uses a hierarchical index
Frase correta: B-trees and databases keep keys in a sorted order for sequential
traversing; they also use a hierarchical index

Explicação: Como se trata de “B-trees”, no plural, precisamos do pronome “they”


também no plural em vez de “it”, e também da conjugação do verbo “to use” no plural.
As frases seguintes seguiram pelo mesmo erro, usando “it”. O instrutor provavelmente
mudou sua linha de pensamento no meio da frase.

42

You might also like