increasing entropy of the universe



Posts Tagged “two pointers”

Mon 17 Jan 2022

Leetcode - Longest Substring Without Repeating Characters

In this [leetcode](https://leetcode.com/problems/longest-substring-without-repeating-characters/) problem, we’re asked to find the length of the longest string of characters in a provided string that does not contain repeating characters. In other words, in the string `abcabcbb` the longest substring without repeating characters is `abc` (with a length of 3)...

Continue reading → leetcode two pointers set



Thu 04 Nov 2021

Ternary String solution Codeforces - 1354B

Ternary string is an interesting problem that could be solved using two pointers techniques. It's a convenient way to keep track of multiple indices. This helps in making decisions based on two values...

Continue reading → codeforces two pointers java python



Tue 13 Nov 2018

Three Sum Problem Leetcode Solution

Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero...

Continue reading → leetcode two pointers java