×

# String question

 0 https://www.hackerrank.com/contests/seriea/challenges/limak-and-weird-subsequences Can anyone give me some hint of this question?? Contest not running.. asked 14 Jun '18, 00:29 42●5 accept rate: 7%

 0 The problem basically asks you are given a string, if you can choose a subset of characters such that when taken in same order as present in the main string they have same beginning and end character. This can be easily solved using bitmasking. I won't explain much. If you want you can have a look at my code. If you don't know bitmasking learn it and then attempt this.  for(int mask=0;mask<(1ll<
 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×643

question asked: 14 Jun '18, 00:29

question was seen: 97 times

last updated: 14 Jun '18, 06:28