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: README.md
+9-1
Original file line number
Diff line number
Diff line change
@@ -105,6 +105,8 @@ start and end of array is chosen(specifically where array is split again and aga
105
105
- In case of string arr size should be measured using strlen and not using sizeof as sizeof also includes \0
106
106
- Sometimes a string can be merged with itself or the other to solve some algos. For eg: if one string is rotation of the other, concatenating one with itself can give a string where second string will be a substring in this string.
107
107
- Store as many things as required to solve the algo in hash table as it is a structure
108
+
- It is always good to free memory assigned to hashTable after the end of the program
109
+
- Sometimes hashtable value can be decremented and not incremented to solve an algo for eg. finding anagram
108
110
109
111
# Topic0: Programming Questions
110
112
@@ -264,7 +266,8 @@ start and end of array is chosen(specifically where array is split again and aga
264
266
-[Reverse a given string](/strings/question5.c)
265
267
-[Check whether given string is palindrome or not](/strings/question6.c)
266
268
-[Find the first non-repeating character in a given string](/strings/question7.c)
267
-
-[](/strings/question8.c)
269
+
-[Run length encoding](/strings/question8.c)
270
+
-[Check whether given two strings are anagrams of each other](/strings/question9.c)
268
271
269
272
270
273
## Some important concepts to solve algos better
@@ -337,6 +340,11 @@ trees having random number of children not necessary equal
337
340
are at same level but do not have same parent
338
341
- O(1) means time complexity or space complexity is not dependent on the input size
339
342
- One string is rotation of the other, if one of the rotations of one string matches the other one.
343
+
- Run length encoding means, traversing through the given character array and displaying which character
344
+
is repeating how many times along with the character as output.
345
+
Eg: SSMMMAAARRT => S2M3A3R2T1
346
+
- Two strings are anagrams if they have same no of characters and they are composed of the same letters.
347
+
Even if there are repetitions, they are going to be same.
0 commit comments