manikandan-ravikiran/Leetcode_Playground
Solutions to problems in cracking the coding interview and leetcode
Python
Issues
- 0
Zero Matrix
#13 opened by manikandan-ravikiran - 0
String Compression:
#12 opened by manikandan-ravikiran - 0
One Away:
#11 opened by manikandan-ravikiran - 0
Sum Lists:
#10 opened by manikandan-ravikiran - 0
Palindrome: Implement a function to check if a linked list is a palindrome
#9 opened by manikandan-ravikiran - 0
Intersection: Given two (singly) linked lists, determine if the two lists intersect. Return the intersecting node. Note that the intersection is defined based on reference, not value. That is, if the kth node of the first linked list is the exact same node (by reference) as the jth node of the second linked list, then they are intersecting.
#8 opened by manikandan-ravikiran - 0
Stack Min: How would you design a stack which, in addition to push and pop, has a function min which returns the minimum element? Push, pop and min should all operate in 0(1) time.
#7 opened by manikandan-ravikiran - 0
Sort Stack: Write a program to sort a stack such that the smallest items are on the top. You can use an additional temporary stack, but you may not copy the elements into any other data structure (such as an array). The stack supports the following operations: push, pop, peek, and is Empty.
#6 opened by manikandan-ravikiran - 0
Three in One: Describe how you could use a single array to implement three stacks.
#5 opened by manikandan-ravikiran - 0
String Rotation:Assumeyou have a method isSubstringwhich checks if oneword is a substring of another. Given two strings, sl and s2, write code to check if s2 is a rotation of sl using only one call to isSubstring (e.g., "waterbottle" is a rotation of"erbottlewat").
#4 opened by manikandan-ravikiran - 0
Palindrome Permutation: Given a string, write a function to check if it is a permutation of a palindrome. A palindrome is a word or phrase that is the same forwards and backwards. A permutation is a rearrangement of letters. The palindrome does not need to be limited to just dictionary words. EXAMPLE Input: Tact Coa Output: True (permutations: "taco cat", "atco eta", etc.)
#3 opened by manikandan-ravikiran - 0
URLify: Write a method to replace all spaces in a string with '%20'. You may assume that the string has sufficient space at the end to hold the additional characters, and that you are given the "true" length of the string. (Note: If implementing in Java, please use a character array so that you can perform this operation in place.)
#2 opened by manikandan-ravikiran - 0
Is Unique: Implement an algorithm to determine if a string has all unique characters. What if you cannot use additional data structures?
#1 opened by manikandan-ravikiran