You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Interview_Questions.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -174,7 +174,7 @@ Output : 5`
174
174
#### 62. Given two strings in lowercase, the task is to make them anagram. The only allowed operation is to remove a character from any string. Find minimum number of characters to be deleted to make both the strings anagram?
175
175
If two strings contains same data set in any order then strings are called Anagrams.
#### 63. Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.
190
190
Examples:
191
191
192
-
`Input: arr[] = {2, 0, 2}
192
+
``Input: arr[] = {2, 0, 2}
193
193
Output: 2
194
194
Structure is like below
195
195
||
@@ -213,7 +213,7 @@ Output: 6
213
213
||||
214
214
_|_||_||||||
215
215
Trap "1 unit" between first 1 and 2, "4 units" between
216
-
first 2 and 3 and "1 unit" between second last 1 and last 2`
216
+
first 2 and 3 and "1 unit" between second last 1 and last 2``
217
217
218
218
#### 64. Given two strings str1 and str2 and below operations that can performed on str1. Find minimum number of edits (operations) required to convert ‘str1’ into ‘str2’.
219
219
Insert
@@ -224,7 +224,7 @@ Replace
224
224
225
225
All of the above operations are of equal cost.
226
226
227
-
`Examples:
227
+
``Examples:
228
228
229
229
Input: str1 = "geek", str2 = "gesek"
230
230
Output: 1
@@ -239,12 +239,12 @@ Output: 3
239
239
Last three and first characters are same. We basically
240
240
need to convert "un" to "atur". This can be done using
241
241
below three operations.
242
-
Replace 'n' with 'r', insert t, insert a`
242
+
Replace 'n' with 'r', insert t, insert a``
243
243
244
244
#### 65. Given a string with repeated characters, task is rearrange characters in a string so that no two adjacent characters are same.
245
245
Note : It may be assumed that the string has only lowercase English alphabets.
246
246
247
-
`Examples:
247
+
``Examples:
248
248
249
249
Input: aaabc
250
250
Output: abaca
@@ -256,7 +256,7 @@ Input: aa
256
256
Output: Not Possible
257
257
258
258
Input: aaaabc
259
-
Output: Not Possible`
259
+
Output: Not Possible``
260
260
261
261
#### 66. This problem is know as Clock angle problem where we need to find angle between hands of an analog clock at a given time.
0 commit comments