Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Palindrome checker

Determine if a string is a palindrome (the same forwards and backwards) Note that the solution should be case insensitive, and ignore all whitespace and punctuation characters (Go hang a salami, I'm a lasagna hog! is a valid palindrome for the purposes of this challenge) null strings will also be considered palindromes.

Remove duplicates O(1) Space

Problem: Given a sorted array of integers, remove the duplicates in-place such that each unique element appears only once, and return the new length. You must not allocate extra space for another array — modify the input array in-place with O(1) extra memory. Input: [1, 1, 2, 2, 3] Output: 3, array becomes [1, 2, 3, , ] (values past the returned length don't matter)

About

Two algorithm questions for prospective GS candidates to test live coding and critical thinking

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages