Category: Java
August 5, 2024
algorithms, BASH, c / c++, c #, C/C++, C# (CSharp), Go, Go Programming, Hashing, java, Java, javascript, Node.Js, PHP, php, programming languages, Python, Rust
A simple yet effective hash function for strings is the well-known “djb2” algorithm by Daniel J. Bernstein. It is simple to implement and has good performance characteristics for many …
December 9, 2020
algorithms, BASH, bash script, c / c++, c #, C/C++, C# (CSharp), Java, java, javascript, Node.Js, PHP, php, programming languages, python, Python, Rust, string, vbscript, VBScript
You are given a lowercase alphabet string text. Return a new string where every character in text is mapped to its reverse in the alphabet, so that a becomes …
August 31, 2020
algorithms, Binary Tree, c / c++, C/C++, code, data structure, interviews, Java, programming languages, Python
A Binary Search Tree (BST) is a commonly used data structure that can be used to search for an item in O(LogN) time. A BST has the following characteristics: …
In a array A of size 2N, there are N+1 unique elements, and exactly one of these elements is repeated N times. Return the element repeated N times. Example …