Problem Given a boolean expression consisting of the symbols 0 (false), 1 (true), & (AND), | (OR), and ^ (XOR), […]

# Tag: combinatorics

## Mapping words to letters which contains

Problem Given sentence for example: ala ma kota, kot koduje w Javie kota I should to every letter occurring in […]

## Swift function to find a specific set of combinations of 3 digits within a larger integer array

Problem I asked this question on Stack Overflow and was directed here. I’m working on a function that will help […]

## Project Euler #62 + Java 8 streams

Problem (Inspired by this question) The digits of the cube, 41063625 (3453), can be permuted to produce two other cubes: […]

## Heap’s algorithm – integer permutation

Problem Integer permutation using Heap’s algorithm: import java.util.Arrays; public class IntegerPermutation { private static void swap(Integer[] integerArray, int i, int […]

## Minimising the triangle

Problem A triangle needs a good foundation. Every row in the triangle is derived from the sum of the two […]

## Generating alphanumeric combinations

Problem I was happy with my shell script that needed to generate alphanumeric combinations of length N (in this case, […]

## Generating the powerset in C

Problem I am solving another problem in leetcode. Given a set, generate all the subsets of the set. Input: [1,2,3] […]

## Characters set permutations with repetitions

Problem The code bellow generates all the permutation(with repetitions) for given character set. Is there any better(simpler, more performant) way […]

## Given a shape, return all triangles that can be formed

Problem Given a shape, get all triangles that can be possible by connecting the points. Example: given 3 points, only […]