diff --git a/src/App.tsx b/src/App.tsx
index 521ae75..06ec891 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -41,6 +41,7 @@ import { rearrangeArray } from "./leetcode/rearrangeArray";
import { removeElement } from "./leetcode/remove-element";
import "./algo/findAndPrintUniqueValueCount";
+import CodeWithMik from "./code-with-mik/CodeWithMik";
import { repeatedSubstringPattern } from "./leetcode/repeatedSubstringPattern";
import { reverseInteger } from "./leetcode/reverseInteger";
import { searchInsert } from "./leetcode/searchElement";
@@ -52,6 +53,7 @@ import {
import { unionIntersection } from "./leetcode/unionIntersection";
import { unionOfSortedArray } from "./leetcode/unionOfSortedArray";
import Practice from "./practice";
+import SanketPlaylist from "./sanket-playlist/SanketPlaylist";
import SortingVisualizer from "./views/SortingVisualizer";
function App() {
@@ -165,6 +167,8 @@ function App() {
<>
+
+
Vite + React
Radix Sort{" "}
diff --git a/src/code-with-mik/CodeWithMik.tsx b/src/code-with-mik/CodeWithMik.tsx
new file mode 100644
index 0000000..dfacc60
--- /dev/null
+++ b/src/code-with-mik/CodeWithMik.tsx
@@ -0,0 +1,7 @@
+import { findTheDifference } from "./find-the-difference";
+
+const CodeWithMik = () => {
+ return
{findTheDifference("tabsdd", "tabs")}
;
+};
+
+export default CodeWithMik;
diff --git a/src/code-with-mik/find-the-difference.ts b/src/code-with-mik/find-the-difference.ts
new file mode 100644
index 0000000..8e4423d
--- /dev/null
+++ b/src/code-with-mik/find-the-difference.ts
@@ -0,0 +1,68 @@
+/*
+You are given two strings s and t.
+
+String t is generated by random shuffling string s and then add one more letter at a random position.
+
+Return the letter that was added to t.
+
+
+
+Example 1:
+
+Input: s = "abcd", t = "abcde"
+Output: "e"
+Explanation: 'e' is the letter that was added.
+Example 2:
+
+Input: s = "", t = "y"
+Output: "y"
+*/
+
+export function findTheDifference(t: string, s: string) {
+ /*
+
+ - Approach 1
+ This is approach 1 where we are adding ascii value of string and then comparing both of them result output we are returning the character through fromCharCode which accepts ascii number and it will return the string
+ */
+ /*
+
+ const string1 = t
+ .split("")
+ .map((char) => char.charCodeAt(0))
+ .reduce((acc, curr) => acc + curr);
+ const string2 = s
+ .split("")
+ .map((char) => char.charCodeAt(0))
+ .reduce((pre, curr) => pre + curr);
+
+ return String.fromCharCode(string1 - string2);
+ */
+
+ /* Approach 2 */
+
+ // Count characters in t
+ const charMap: Record = {};
+ for (let i = 0; i < t.length; i++) {
+ const char = t.charAt(i);
+ if (charMap[char]) {
+ charMap[char]++;
+ } else {
+ charMap[char] = 1;
+ }
+ }
+
+ // Subtract counts for s
+ for (let i = 0; i < s.length; i++) {
+ const char = s.charAt(i);
+ if (charMap[char]) {
+ charMap[char]--;
+ }
+ }
+
+ // Find the extra character
+
+ for (const char in charMap) {
+ if (charMap[char] > 0) return char;
+ }
+ return "";
+}
diff --git a/src/code-with-mik/index.ts b/src/code-with-mik/index.ts
new file mode 100644
index 0000000..82f150e
--- /dev/null
+++ b/src/code-with-mik/index.ts
@@ -0,0 +1 @@
+export * from "./find-the-difference";
diff --git a/src/sanket-playlist/SanketPlaylist.tsx b/src/sanket-playlist/SanketPlaylist.tsx
new file mode 100644
index 0000000..4f5000c
--- /dev/null
+++ b/src/sanket-playlist/SanketPlaylist.tsx
@@ -0,0 +1,7 @@
+import { minimumOfThree } from "./minimum-of-three";
+
+const SanketPlaylist = () => {
+ return {minimumOfThree(15, 13, 4)}
;
+};
+
+export default SanketPlaylist;
diff --git a/src/sanket-playlist/index.ts b/src/sanket-playlist/index.ts
new file mode 100644
index 0000000..a8cf877
--- /dev/null
+++ b/src/sanket-playlist/index.ts
@@ -0,0 +1 @@
+export * from "./minimum-of-three";
diff --git a/src/sanket-playlist/minimum-of-three.ts b/src/sanket-playlist/minimum-of-three.ts
new file mode 100644
index 0000000..fee270e
--- /dev/null
+++ b/src/sanket-playlist/minimum-of-three.ts
@@ -0,0 +1,9 @@
+/*
+This problem is about finding minimum value among three values
+like x=10, y=20, z=14 so minimum value will be x=10
+**/
+export function minimumOfThree(x: number, y: number, z: number): number {
+ if (x < y && x < z) return x;
+ if (y < x && y < z) return y;
+ return z;
+}