
Security News
Potemkin Understanding in LLMs: New Study Reveals Flaws in AI Benchmarks
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
findpattern
Advanced tools
I am really tired of this ... A lot of assessment for a f* job required to make a stupid function .... they ask to have the times of repetition of substrings like "ABCABC" ... and the same function need to report the length of same chars like 'CCCC'... Please, refuse test or assessment like that... not have any sense... especially if you looking for a position as front end... Should be a 'creative' position... what is the purpose of this test??? ... Know if you are crazy?, stupid?... so... it's my solution for you!
This is the most used test...
My name is Dario Passariello... you can agree with me or not... but life is short....
So, I see that some test asking for a solution like this... enjoy! "The test ask to have count of groups pr count of word of subsequence"
const findPattern = ( word ) => {
let
replace = word.match( /(.+)(?=.*?\1)/g ),
pattern = new RegExp( replace , "g"),
final = word.match( pattern );
// console.log( replace );
// console.log( pattern );
// console.log( final );
if( final )
return final.length;
else if
return word.length;
};
// test it:
console.log( findPattern('abcabc') ); // -> 2 groups
console.log( findPattern('cccc') ); // -> 4 chars
So, I see that some test asking for a solution like this... enjoy! "The test ask to have the length about on not repeated subsequence"
var findPattern = function( word ) {
const count = new Set(word);
return count.size;
};
// test it:
console.log( findPattern('abcabc') ); // -> 3
console.log( findPattern('cccc') ); // -> 1
FAQs
I am tired of this s**t
The npm package findpattern receives a total of 24 weekly downloads. As such, findpattern popularity was classified as not popular.
We found that findpattern demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.