Tag Archives: string
Leetcode 30 – Substring with concatenation of all words
Source: https://leetcode.com/problems/substring-with-concatenation-of-all-words/ Problem statement You are given a string s and an array of strings words. All the strings of words are of the same length. A concatenated substring in s is a substring that contains all the strings of any permutation of words concatenated. For example, if words = [“ab”,”cd”,”ef”], then “abcdef”, “abefcd”, “cdabef”,…
Codeforces Round #793 – Problem A
A. Palindromic Indices time limit per test: 1 second memory limit per test: 256 megabytes input: standard input output: standard output You are given a palindromic string s of length n. You have to count the number of indices i (1≤i≤n) such that the string after removing si from s still remains a palindrome. For…
Google CodeJam 2022 – Qualification – 1. Punched Cards
Problem A secret team of programmers is plotting to disrupt the programming language landscape and bring punched cards back by introducing a new language called Punched Card Python that lets people code in Python using punched cards! Like good disrupters, they are going to launch a viral campaign to promote their new language before even having the…
Google KickStart – Round A – Problem 1
Barbara is a speed typer. In order to check her typing speed, she performs a speed test. She is given a string I that she is supposed to type. While Barbara is typing, she may make some mistakes, such as pressing the wrong key. As her typing speed is important to her, she does not want to…