-
freq_occuring items -> Finds the maximum occuring character in an array or python list. It only first only one maximum occuring character.
-
first duplicate -> Finds the number that has duplicate in the list. If there are more than one numbers that are duplicate then it finds the number whose duplicate is index closer to the original number.
-
sum_of_two_nums -> Given a list of numbers and a number k, return whether any two numbers from the list add up to k.
-
char_occurence_in_string -> Program to find the number of occurences using dictionary and sorting it to print out in ascending order
-
sum_of_numbers_in_string -> Finds the sum of numbers in given alphanumeric string
-
check_balanced_parenthesis -> Checks if the given string has balanced parenthesis (LeetCode Easy Problem)
-
roman_to_int_conversion -> Converts the string of roman numericals to integer numbers (LeetCode Easy Problem)
-
merge_to_sorted_list -> Merges two sorted arrays to first sorted array and returns as one sorted array (LeetCode Easy Problem)
-
plus_one -> Given a non-empty array of digits representing a non-negative integer, plus one to the integer. Digits are stored such that the most significant digit is at the head of the list, and each element in the array contain a single digit (LeetCode Easy Problem)
-
integer_palindrome -> Given an integer determine if the given integer is palindrome or not. (LeetCode Easy Problem)
-
reverse_vowels -> Reverses the positon of vowels in a given string
-
secondlargest.py -> Finds the second largest integer from a given array
-
isAnagram.py -> Finds if the two given strings are anagram or not (LeetCode Easy Problem)
-
isIsomorphic.py -> Checks if the two given strings are isomorphic or not (LeetCode Easy Problem)
-
pairwise_sum.py -> Finds all the pairwise sum from the given array that matches the corresponding given value
-
string_compression.py -> Returns both the number of times each characters and characters occured in a string
-
remove_duplicate.py -> Finds the string of url from urls.txt file that occurs most frequently (Asked by Clumio)
-
remove_duplicate.py -> Returns the list after removing duplicate nums from it (LeetCode Easy Problem)
-
product.py -> Given an array of integers, return a new array such that each element at index i of the new array is the product of all the numbers in the original array except the one at i. (Asked by Uber)
-
serialize_binary_tree.py -> Given the root to a binary tree, implement serialize(root), which serializes the tree into a string, and deserialize(s), which deserializes the string back into the tree. (Asked by Google)
-
non_adj_num.py -> Given a list of integers, write a function that returns the largest sum of non-adjacent numbers. Numbers can be 0 or negative.For example, [2, 4, 6, 8] should return 12, since we pick 4 and 8. [5, 1, 1, 5] should return 10, since we pick 5 and 5. (Asked by Airbnb)
-
ordered_log.py -> You run an e-commerce website and want to record the last N order ids in a log. Implement a data structure to accomplish this, with the following API: record(order_id): adds the order_id to the log get_last(i): gets the ith last element from the log. i is guaranteed to be smaller than or equal to N. You should be as efficient with time and space as possible. (Asked by Twitter)
-
char_encoding.py -> Given the mapping a = 1, b = 2, ... z = 26, and an encoded message, count the number of ways it can be decoded. (Asked by Facebook)
-
sentence_split.py -> Given a dictionary of words and a string made up of those words(no space), return the original sentence in a list. If there is more than one possible reconstruction, return any of them. If there is no possible reconstruction, then return null.
-
unival_trees.py -> Given the root to a binary tree, count the number of unival subtrees. A unival tree (which stands for "universal value") is a tree where all nodes under it have the same value.(Asked by Google)
-
find_fixed_point -> Given a sorted array of distinct elements, return a fixed point, if one exists. Otherwise, return False. A fixed point in an array is an element whose value is equal to its index.
-
Notifications
You must be signed in to change notification settings - Fork 0
saradcd77/interview_problems
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
common interview problems solution
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published