A graph is a collection of vertices (nodes) that are connected by edges to form a network. Graphs are very versatile data structures and algorithms that can solve many real-world problems. Charts are often used on social networks like LinkedIn or Facebook. With the development of Graph QL, data is organized into graphs or networks.
General interview questions:
- Find the shortest path between two peaks
- Check if there is a path between two vertices
- Find the “mother node” on the graph
What is hashing? Before diving into hash tables, it’s important to understand what hashing is.
Hash is the process of assigning a unique index to an object, known as a key. Each object is identified by a key-value pair and the set of objects is known as a dictionary.
A hash table is implemented by storing elements in an array and identifying them by key. The hash function takes a key and returns the index for which the value is stored.
That way, whenever you enter a key in a hash function, it will always return the same index that will identify the associated item. In addition, if the hash function ever obtains a unique key that returns the index already used, you can create a chain of elements with a linked list.
A hash table has several useful applications:
- When a resource is shared by multiple consumers
- Password verification
- Linking file name and path
Common interview questions:
- Find symmetric pairs in an array
- Union and intersection of lists using hashing
Binary search tree
A binary search tree is a binary tree data structure composed of nodes. The nodes are organized with the following properties:
- The left sub node always contains values less than the parent node.
- The right sub node always has a value larger than the original node.
- Both sub nodes will also be binary search trees.
Binary search trees are used in many search applications and are also used to define objects that need to be displayed in a 3D game. This Data Structures online courses is widely used in engineering projects because hierarchical data is very common.
- Search — Find an item
- Insert — inserts an element into the tree.
- Pre-order Traversal — Preorder tree traversal
- Traversing in order — traversing the tree in order
- Post-order traversal — tree traversal in post-ordered mode.
General interview questions:
- Find the kth maximum value in the binary search series
- Find the minimum value in the binary search series
- Navigate a given directory using Breadth-First Search
Important algorithms to learn
Recursion is the practice whereby a function calls itself directly or indirectly. The corresponding callable function is called a recursive function. While recursion is often associated with an algorithms online classes, it can help you understand it as a way or methodology to solve a problem.
It is a common practice to solve a complex problem by breaking it down into smaller problem instances until we can solve it. By using recursion, you can simplify many complex tasks that would otherwise be difficult.
Bubble Sort is a simple sorting algorithm that swaps adjacent items if they are in the wrong order. The algorithms online courses will iterate over the array multiple times until the elements are in the correct order.
Selection sorting is an algorithm that divides a collection of items into ordered and unsorted. During each iteration, Learn algorithms online finds the smallest element in the unsorted group and moves it to the end of the sorted group.
Entry sort is a simple sorting algorithm that sorts the last array by sorting one element at a time. how does it work?
Examines each element and compares it to the sorted elements on the left.
Inserts items in the correct order for sorted elements
Binary search is the most efficient element search algorithm. The data structures and algorithms works by comparing the middle element of an array or list with the target element. If the values match, the index of the element is returned. Otherwise, the list will be halved.
If the target was less than the average, the new list would be the left half. If the target was greater than the average, the new list would be the right half.