CᴏᴅɪɴɢNᴇʀᴅ 💸🐾
99 subscribers
118 photos
3 videos
15 files
40 links
༗ हरे कृष्णा ༗
"Lost in my own cosmos 💫 | Coding Need Patience 🥀🐾"

❝Face the failure, Until the Failure fails to face you.❞

— Dreamer

» ChikuX69.netlify.app «

DM ? " @ChikuXBot " : 404;
Download Telegram
Day 66👾:
Given the head of a singly linked list, your task is to left rotate the linked list k times.
2👍21🔥1
console.log('A' - 1);
Anonymous Quiz
27%
A1
24%
Error
31%
NaN
18%
64
🔥21👍1
Day 67👾:
Given the head of two sorted linked lists consisting of nodes respectively. The task is to merge both lists and return the head of the sorted merged list.
🔥32👍1
Day 68👾:
Given the head a linked list, the task is to reverse every k node in the linked list. If the number of nodes is not a multiple of k then the left-out nodes in the end, should be considered as a group and must be reversed.
👍211🔥1👏1
Day 69👾:
Given the head of two singly linked lists num1 and num2 representing two non-negative integers. The task is to return the head of the linked list representing the sum of these two numbers.

For example,
num1 represented by the linked list : 1 -> 9 -> 0, similarly num2 represented by the linked list: 2 -> 5. Sum of these two numbers is represented by 2 -> 1 -> 5.

Note: There can be leading zeros in the input lists, but there should not be any leading zeros in the output list.
🔥3👍1🍾1👨‍💻1
Just Random Clicks 📸
3🥰2🆒2👍1🔥1
Day 70👾:
You are given a special linked list with n nodes where each node has two pointers a next pointer that points to the next node of the singly linked list, and a random pointer that points to the random node of the linked list.

Construct a copy of this linked list. The copy should consist of the same number of new nodes, where each new node has the value corresponding to its original node. Both the next and random pointer of the new nodes should point to new nodes in the copied list, such that it also represent the same list state. None of the pointers in the new list should point to nodes in the original list.

Return the head of the copied linked list.

NOTE : Original linked list should remain unchanged.
🔥2👏21👍1
Day 71👾:
You are given the head of a singly linked list. Your task is to determine if the linked list contains a loop. A loop exists in a linked list if the next pointer of the last node points to any other node in the list (including itself), rather than being null.
🔥2👏21👍1
Day 72👾:
Given a head of the singly linked list. If a loop is present in the list then return the first node of the loop else return NULL.

Custom Input format:
A head of a singly linked list and a pos (
1-based index) which denotes the position of the node to which the last node points to. If pos = 0, it means the last node points to null, indicating there is no loop.
👍2🔥21👏1
Day 73👾:
Given the head of a linked list that may contain a loop. A loop means that the last node of the linked list is connected back to a node in the same list. The task is to remove the loop from the linked list (if it exists).

Custom Input format:

A head of a singly linked list and a pos (1-based index) which denotes the position of the node to which the last node points to. If pos = 0, it means the last node points to null, indicating there is no loop.

The generated output will be true if there is no loop in list and other nodes in the list remain unchanged, otherwise, false.
👍4🔥1👏1
Day 74👾:
Design a data structure that works like a LRU Cache. Here cap denotes the capacity of the cache and Q denotes the number of queries. Query can be of two types:

PUT x y: sets the value of the key x with value y
GET x: gets the value of key x if present else returns -1.
The LRUCache class has two methods get() and put() which are defined as follows.

get(key): returns the value of the key if it already exists in the cache otherwise returns -1.
put(key, value): if the key is already present, update its value. If not present, add the key-value pair to the cache. If the cache reaches its capacity it should remove the least recently used item before inserting the new item.
In the constructor of the class the capacity of the cache should be initialized.
2👍21🔥1🖕1
Day 75👾:
Given a string s, which may contain duplicate characters, your task is to generate and return an array of all unique permutations of the string. You can return your answer in any order.
👍21🔥1👏1
Day 76👾:
Implement the function power(b, e), which calculates b raised to the power of e (i.e. b^e).
🔥2👏21👍1
🖤🕯️
2😢2👍1🙏1
Day 77👾:
The n-queens puzzle is the problem of placing n queens on a (n × n) chessboard such that no two queens can attack each other. Note that two queens attack each other if they are placed on the same row, the same column, or the same diagonal.

Given an integer n, find all distinct solutions to the n-queens puzzle.
You can return your answer in any order but each solution should represent a distinct board configuration of the queen placements, where the solutions are represented as permutations of
[1, 2, 3, ..., n]. In this representation, the number in the ith position denotes the row in which the queen is placed in the ith column.
For eg. below figure represents a chessboard
[3 1 4 2].
👏3👍21
Completed 77 Day Of Coding 🎉
🔥3👍2🤩21
This media is not supported in your browser
VIEW IN TELEGRAM
👍2🔥1🥰1🎄1😘1
print(7 > 6 > 5)
Anonymous Quiz
79%
True
21%
False
👍3👎1
New Junior Developers Can’t Actually Code??


Read This Blog:
https://nmn.gl/blog/ai-and-learning
👍3🤷‍♀2🔥2👀1