Skip to content

insanity13/sandbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The article https://habr.com/ru/articles/926214/ listed three interview test samples. I was curious to try them myself, since I haven't interviewed in a long time

Benchmark

The Benchmark project is designed to measure the algorithm's performance (execution speed) and memory usage.

Tests

The Tests project contains test cases to verify the correctness of the algorithm.

Sandbox

The Sandbox project contains the actual algorithm implementation.

MergeArrays

Given two sorted integer arrays (ascending order), possibly of different lengths, merge them into a single sorted array without duplicates, using only constant extra memory.

Keyboard

Keyboard is broken:

  • When he presses b, it deletes the last lowercase letter entered.
  • When he presses B, it deletes the last uppercase letter entered. All other keys work normally.

Given a string consisting of uppercase and lowercase English letters (representing the sequence of key presses), determine the final output.

SubArrays

Given an array of non-negative integers, find a contiguous subarray with the maximum sum where there are no more than two distinct numbers. Return the sum.

Example: [10, 10, 5, 5] → Valid (only two distinct numbers: 10 and 5).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages