Since 15th medium problem I have stopped solving in 4 languages 'cuz it's overwhelming. TS now is a JS with types, so no need to write ES5 manually if it is not a language specific tasks. Dart is a very interesting and much well-organized language than a JS or TS, but since Dart is not a web standard and being used mostly for high abstract mobile development, there is not much sense in learning and using it instead of JS or Java/Kotlin.
- Add new native method to the strings.
- native Bind
- native Call
- native forEach
- native string reverse
- 5 ways of prototyping object in JS
- my Object.create()
- five(plus(seven(minus(three())))) which returns 9
- carry
- methods chain
TODO:
- myMap
- findFirstLeftTargetIdx
- findFirstRightTarget
- isPalindrome
- findTargetElemByCount
- countVowels
- rangeSum
- findMiddleChar
- squareEachNum
- removeVowels
- replaceAll
- findPrevDuplicate
- findDuplicates
- findDuplicatesInRange
- countDuplicates
- getAlphabetLetterIdx
- withSeparator
- isEmptyObj
- findMaxArrVal
- shortestStr
- showAtIntervals
- showAtAutoIntervals
- checkBracketsSimple
- calcChars
- buildEgyptTriangle
- fizzBuzz
- squareGrid
- linearSearch
- countdown
- checkBrackets (Wirth)
- groupAnagramPairs
- findPopularChar
- findFirstAndSecondMax
- findMinEven
- closureCounter
- fibonacci
- uniqueSums
- findLastIdx
- compareStr
- reverseStr
- findBlackSheep
- longestCommonPrefixSimple* (>>> current repeat)
- findBinaryTreeSum
- findObjectArrsSumRec
- binarySearch (Wirth)
- tableSearch (Wirth list search)**
- simpleSearchString (Wirth)***
- insertionSort (Wirth)
- binaryInsertionSort (Wirth)
TODO:
- generate binary tree (class)
- binarySearch
- sber problem
- func('a.b.d.e') -> { a: { b: { d: { e: {} } } } }
- findDeepestLeavesSum (sumTree)
- flat array or object
- knuthMorrisPrattSubstringSearch (Wirth)
- boyerMooreSubstrSearch (Wirth)
TODO:
- arrSubset
- rotate matrix at right up to 90 degrees
- LinkedList
- Queue
- myStringIntoSmsArr
*longestCommonPrefixSimple - marked simple just because we assume that the problem is to find most common prefix in the array of words which are definitely all have something in common, like 'flower', 'flow', 'Flight'... It is not a suitable solution for a hard big search through any words, like 'red', ' ', 'Flight', '#@@@@!', 'm', 'flow', 'sdfSsgsdDghj gsd 12', '4560000456.45', 'flower'...
** not completed
*** implementing Dijkstra loop
Since 15th medium problem I have stopped solving in 4 languages 'cuz it's overwhelming. TS now is a JS with types, so no need to write ES5 manually if it is not a language specific tasks. Dart is a very interesting and much well-organized language than a JS or TS, but since Dart is not a web standard and being used mostly for high abstract mobile development, there is not much sense in learning and using it instead of JS or Java/Kotlin.
- Compile tsc, run and remove js result in the single bash command line:
tsc fileName.ts && node fileName.js && rm -rf fileName.js
or you may use *run_ts_file.sh file in ts catalog in order to use it in a command with a single argument of file name
-
Table search looks for first target entrance in an array. It is like a binary search: we should return left counter of the search.
-
Dijkstra loop implemented in JS, TS, Python and etc. for example, like while loop with if/else condition branches
while (i <= N-M and j < M):
if text[i+j] == pattern[j]:
j += 1
else:
i += 1
j = 0