Data Structures: Augmented Interval Tree to search for intervals overlapping

An Interval Tree is an ordered data structure whose nodes represent the intervals and are therefore characterized by a start value and an end value. A typical application example is when we have a number of available intervals and another set of query intervals, for which we want to verify the overlap… (Read the full article)

Java: using the Fork/Join Framework for the parallel resolution of divide-and-conquer problems

The Fork/Join framework is an high level mechanism, introduced by Java7 within the java.util.concurrent package, for multithreading purposes like parallel execution of a task by multiple processors. In particular, its use is ideal for simplifying the resolution of problems that can be addressed… (Read the full article)

Strutture dati: Augmented Interval Tree per verificare la sovrapposizione tra intervalli

Un Interval Tree è una struttura dati ordinata i cui nodi rappresentano degli intervalli e sono quindi caratterizzati da un valore di inizio ed un valore di fine. Un esempio tipico di applicazione è quello in cui si hanno una serie di intervalli a disposizione ed un altro insieme di intervalli query, … (Read the full article)

Amazon Interview: trovare l’unico elemento che compare un numero dispari di volte all’interno di un array di interi

Dopo aver analizzato in un post precedente il problema di come trovare se in un array di interi ci sono due elementi che sommati tra loro danno un valore x vediamo ora di analizzare e trovare la soluzione ad un altro problema che mi è stato sottoposto durante il secondo colloquio telefonico in Amazon per… (Read the full article)

Amazon Interview: check if an array of integers contains two elements that sum to a given x

During a phone interview for a Software Development Engineer position in Amazon I was asked to find, and code via the CollabEdit platform, the solution to the following problem:
Given an array of integers, write a method that returns true if in the array there are two elements that added together give(Read the full article)

Amazon Interview: verificare se in un array di interi ci sono due elementi che sommati tra loro danno x

Durante un colloquio telefonico da Software Development Engineer in Amazon mi è stato chiesto di trovare, e codificare tramite la piattaforma CollabEdit, la soluzione al seguente problema:
Dato un array di interi, scrivere un metodo che ritorna true se all’interno dell’array ci sono(Read the full article)

Radix Sort in Java: descrizione ed implementazione dell’algoritmo

Radix Sort è un algoritmo di ordinamento non basato sul confronto degli elementi da ordinare. Prevede invece di ordinare gli elementi, nella sua versione cosiddetta LSD (Least significant digit) partendo con l’analisi della cifra meno significativa e raggruppando gli elementi in dei “contenitori”,… (Read the full article)

Spotify Puzzles: solving the ReverseBinary using Decimal/Binary and Binary/Decimal conversion algorithms

We have already seen in the article “Spotify Puzzles: solving ReverseBinary in Java with just 1 line of code” how to solve the Reverse Binary puzzle proposed by Spotify using the methods offered by Integer and StringBuilder classes to manipulate objects, without applying any conversion… (Read the full article)

Spotify Puzzles: il ReverseBinary con gli algoritmi di conversione Decimale/Binario e Binario/Decimale

Abbiamo già visto nel post Spotify Puzzles: risolvere il ReverseBinary in Java con 1 sola riga di codice come risolvere il puzzle Reverse Binary proposto da Spotify, sfruttando i metodi offerti dalle classi Integer e StringBuilder per manipolare gli oggetti, senza applicare nessuna logica di conversione… (Read the full article)

Tesi Specialistica – Capitolo 3: L’algoritmo di Pivoting-Based Retrieval

Come visto nel capitolo di introduzione ai sistemi di CBR, la strategia classica di retrieval è costituita dal KNN, che prevede il confronto, cioè il calcolo della similarità, tra il caso query in input e tutti i casi presenti nella base di conoscenza. Questa soluzione può non essere molto efficiente… (Read the full article)