Skip to content

Instantly share code, notes, and snippets.

@ZeeshanAdilButt
Last active September 25, 2021 22:15
Show Gist options
  • Save ZeeshanAdilButt/f94e7a18578041002102f257a5e12e6e to your computer and use it in GitHub Desktop.
Save ZeeshanAdilButt/f94e7a18578041002102f257a5e12e6e to your computer and use it in GitHub Desktop.
Git gist for the programming problems we covered so far and the relevant learning material

String Algorithms

#Problem #0

Reverse string

Solution (JS) https://github.com/anique12/Coding-problems/blob/master/strings/reverse-string.js


#Problem #1

Problem: https://www.hackerrank.com/challenges/weighted-uniform-string/problem

Solution (JS): https://github.com/anique12/Coding-problems/blob/master/strings/weighted-uniform-strings.js


#Problem #2

Given two strings ‘a’ and string ‘b’, we have to check if they are anagrams of each other or not and return True/False

Solution (JS): https://github.com/anique12/Coding-problems/blob/master/strings/is-anagram.js


#Problem #3

Given two strings determine whether they are palindrome or not

Solution (JS): https://github.com/anique12/Coding-problems/blob/master/strings/is-palindrome.js


#Problem #4

Problem: Given a string, check if that string is Pangram or not. A pangram is a sentence containing every letter in the English Alphabet.

Solution (JS): https://github.com/anique12/Coding-problems/blob/master/strings/is-pangram.js


#Problem #5

Validate HTML DOM of string:

Solution (JS) : https://github.com/anique12/Coding-problems/blob/master/strings/dom-validation.js

#################################################################################

Array Algorithms

#Problem #0

Question: Find duplicate in an array.

Solution (JS) : https://github.com/anique12/Coding-problems/blob/master/arrays/contains-duplicate.js


#Problem #1

Min Max in array

Solution (JS): https://github.com/anique12/Coding-problems/blob/master/arrays/min-max-array.js


#Problem #2

Sentence reverse

Question: Given an array of characters with words separated by empty string ''. You have to words.

  • For example, given an array ['p','e','r','f','e','c','t','','m','a','k','e','s','','p','r','a','c','t','i','c','e']
  • The output should be ['p','r','a','c','t','i','c','e','','m','a','k','e',s,'p','e','r','f','e','c','t']

Solution (JS): https://github.com/anique12/Coding-problems/blob/master/arrays/sentence-reverse.js


#Problem #3

https://www.hackerrank.com/challenges/array-left-rotation/problem

Solution :


#Problem #4

kth smallest element

https://www.cdn.geeksforgeeks.org/kth-smallestlargest-element-unsorted-array/


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment