Define a stack, in which we can get its minimum number with a function min. In
this stack, the time complexity of min(), push() and pop() are all O(1).
A sub-array has one number of some continuous numbers. Given an integer array with positive numbers and negative numbers, get the maximum sum of all sub-arrays. Time complexity should be O(n).
Implement a function to find the first character in a string which only appears once.
A pair contains two numbers, and its second number is on the right side of the
first one in an array. The difference of a pair is the minus result while
subtracting the second number from the first one. Please implement a function
which gets the maximal difference of all pairs in an array. For example, the
maximal difference in the array {2, 4, 1, 16, 7, 5, 11, 9} is 11, which is the
minus result of pair (16, 5).
How to get the median from a stream of numbers at any time? The median is middle value of numbers. If the count of numbers is even, the median is defined as the average value of the two numbers in middle.
A string can be partitioned into some substrings, such that each substring is a palindrome. For example, there are a few strategies to split the string “abbab” into palindrome substrings, such as: “abba”|”b”, “a”|”b”|”bab” and “a”|”bb”|”a”|”b”.
Given a string str, please get the minimal numbers of splits to partition it into palindromes. The minimal number of splits to partition the string “abbab” into a set of palindromes is 1.
Given a binary search tree and a value k, please find a node in the binary
search tree whose value is closest to k.
No. 46 - Nodes with Sum in a Binary Search Tree
Given a binary search tree, please check whether there are two nodes in it whose sum equals a given value.
No. 47 - Search in a Rotation of an Array
When some elements at the beginning of an array are moved to the end, it gets a rotation of the original array. Please implement a function to search a number in a rotation of an increasingly sorted array. Assume there are no duplicated numbers in the array.
No. 48 - Least Number after Deleting Digits
A sub-array has one number of some continuous numbers. Given an integer array with positive numbers and negative numbers, get the maximum sum of all sub-arrays. Time complexity should be O(n).
Implement a function to find the first character in a string which only appears once.
For example: It returns ‘b’ when the input is
“abaccdeff”.
How to get the median from a stream of numbers at any time? The median is middle value of numbers. If the count of numbers is even, the median is defined as the average value of the two numbers in middle.
How to verify whether a binary tree is a binary search tree?
Given a matrix with 1s and 0s, please find the number of groups of 1s. A group
is defined by horizontally or vertically adjacent 1s. For example, there are
four groups of 1s in Figure 1 which are drawn with different
colors.
Given an array of integers A, please find three indexes i, j,
k, such that i<j<k and
A[i]<A[j]<A[k].A string can be partitioned into some substrings, such that each substring is a palindrome. For example, there are a few strategies to split the string “abbab” into palindrome substrings, such as: “abba”|”b”, “a”|”b”|”bab” and “a”|”bb”|”a”|”b”.
Given a string str, please get the minimal numbers of splits to partition it into palindromes. The minimal number of splits to partition the string “abbab” into a set of palindromes is 1.
No. 46 - Nodes with Sum in a Binary Search Tree
Given a binary search tree, please check whether there are two nodes in it whose sum equals a given value.
No. 47 - Search in a Rotation of an Array
When some elements at the beginning of an array are moved to the end, it gets a rotation of the original array. Please implement a function to search a number in a rotation of an increasingly sorted array. Assume there are no duplicated numbers in the array.
No. 48 - Least Number after Deleting Digits
I really love reading and following your post as I find them extremely informative and interesting. This post is equally informative as well as interesting . Thank you for information you been putting on making your site such an interesting. I gave something for my information. Interview Preparation
ReplyDeleteThank you for this Information !!
ReplyDeleteLINUX INTERVIEW QUESTIONS
Linux FTP vsftpd Interview Questions
SSH Interview Questions
Apache Interview Questions
Nagios Interview questions
IPTABLES Interview Questions
Ldap Server Interview Questions
LVM Interview questions
Sendmail Server Interview Questions
Read more at Linux Troubleshooting
Awesome post.Thank you so much :)
ReplyDeleteThank you sharing this Information
ReplyDeleteI also found Various useful links related to Devops, Docker & Kubernetes
Kubernetes Kubectl Commands CheatSheet
Introduction to Kubernetes Networking
Basic Concept of Kubernetes
Kubernetes Interview Question and Answers
Kubernetes Sheetsheat
Docker Interview Question and Answers
Docker Basic Tutorial
Chatbot Development Company
ReplyDeleteChatbots play a significant role in nurturing leads and optimizing sales by analyzing customer data. It can track purchasing patterns and monitor their browsing activity thus can be ideal for initiating customer interaction. With this customer knows brand is present whenever needed
Not sure which online broker is best? Trading Directory company are here to help. Our goal is to provide you with unbiased and detailed information that will help you make the right decision. Whether it's your first time or you're an experienced trader, finding the right Online Service Provider (OSP) for your trading needs is an important decision.
ReplyDelete