Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0fb29b5

Browse files
author
Amogh Singhal
authored
Update Interview_Questions.md
1 parent 418a63c commit 0fb29b5

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

‎Interview_Questions.md‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ Output : 5`
174174
#### 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?
175175
If two strings contains same data set in any order then strings are called Anagrams.
176176

177-
`Examples:
177+
``Examples:
178178

179179
Input : str1 = "bcadeh" str2 = "hea"
180180
Output: 3
@@ -184,12 +184,12 @@ Input : str1 = "cddgk" str2 = "gcd"
184184
Output: 2
185185

186186
Input : str1 = "bca" str2 = "acb"
187-
Output: 0`
187+
Output: 0``
188188

189189
#### 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.
190190
Examples:
191191

192-
`Input: arr[] = {2, 0, 2}
192+
``Input: arr[] = {2, 0, 2}
193193
Output: 2
194194
Structure is like below
195195
| |
@@ -213,7 +213,7 @@ Output: 6
213213
| || |
214214
_|_||_||||||
215215
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``
217217

218218
#### 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’.
219219
Insert
@@ -224,7 +224,7 @@ Replace
224224

225225
All of the above operations are of equal cost.
226226

227-
`Examples:
227+
``Examples:
228228

229229
Input: str1 = "geek", str2 = "gesek"
230230
Output: 1
@@ -239,12 +239,12 @@ Output: 3
239239
Last three and first characters are same. We basically
240240
need to convert "un" to "atur". This can be done using
241241
below three operations.
242-
Replace 'n' with 'r', insert t, insert a`
242+
Replace 'n' with 'r', insert t, insert a``
243243

244244
#### 65. Given a string with repeated characters, task is rearrange characters in a string so that no two adjacent characters are same.
245245
Note : It may be assumed that the string has only lowercase English alphabets.
246246

247-
`Examples:
247+
``Examples:
248248

249249
Input: aaabc
250250
Output: abaca
@@ -256,7 +256,7 @@ Input: aa
256256
Output: Not Possible
257257

258258
Input: aaaabc
259-
Output: Not Possible`
259+
Output: Not Possible``
260260

261261
#### 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.
262262
`Examples:Input: h = 12:00, m = 30.00

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /