#100DaysOfCode Day 22 - Result: Though brief, today's work has helped me to re-organize my thoughts and construct a better plan for the following weeks. Beginning on Day 23, I will focus on testing the "Create" action and whether it works as expected. The following phases of testing will focus on the "Modify" action, user access controls, and session handling. This should take me the better part of two weeks, but will be adjusted according to the situation.
Marcie Henderson’s Post
More Relevant Posts
-
#Day6 : Solving Leetcode Problems Problem: Merge Two Sorted Lists The task was to merge two given linked lists into one, arranged from smallest to greatest. I initialized a dummy and temp variable at the start. Then, I set up a while loop to check and perform actions while the lists contained numbers. I checked if list1 is less than list2 and vice versa. If true, I assigned the smaller value to the temp variable and moved to the next node. After iterating through all numbers, I made temp equal to temp.next to link the values into dummy, deciding whether list1 or list2 is smaller, and finally returned dummy. #100DaysChallenge
To view or add a comment, sign in
-
-
Day 59 of #100daysofcode. Today I've solved the #LeetCode daily challenge along with a problem on linked list which included adding two numbers in a linked list. The problem can be approached in two ways. Converting the numbers in the linked lists to integers, adding them and then creating a new linked list using the resultant integer. But this becomes impossible for a few testcases with huge linked list. Thus, the problem can be solved using one pointer system where the pointer calculates the sum and carry, assigns them into a new node and link is created at that instant. Time Complexity: O(n) #dailychallenge #HOPE #linkedlist
To view or add a comment, sign in
-
-
#100daysofcodechallenge Day 8: - Created 4 more components today - Fixed some buggy code - Optimized the code
To view or add a comment, sign in
-
-
Day #15 leetcode Code Testcase Testcase Test Result Remove Duplicates from Sorted List Given the head of a sorted linked list, delete all duplicates such that each element appears only once. Return the linked list sorted as well. Example 1: Input: head = [1,1,2] Output: [1,2] Example 2:
To view or add a comment, sign in
-
-
DAY 34 #codingJourney, I solved LeetCode 876. Middle of the Linked List. Given the head of a singly linked list, return the middle node of the linked list. If there are two middle nodes, return the second middle node. Example 1: Input: head = [1,2,3,4,5] Output: [3,4,5] Explanation: The middle node of the list is node 3. Example 2: Input: head = [1,2,3,4,5,6] Output: [4,5,6] Explanation: Since the list has two middle nodes with values 3 and 4, we return the second one. Constraints: The number of nodes in the list is in the range [1, 100]. 1 <= Node.val <= 100
To view or add a comment, sign in
-
-
Codeforces Problem Codeforces Round 966 (Div. 3) A-Primary Task Problem Link https://lnkd.in/gW2hGprE Solution Code #include<bits/stdc++.h> using namespace std; int main(){ freopen("input.in", "r", stdin); freopen("output.in", "w", stdout); int t; cin >> t; while(t--){ string s; char c; cin >> c; getline(cin, s); s = c + s; if(s[0] != '1' && s[1] != '0') cout << "NO" << endl; else if(s[0] == '1' && s[1] == '0'){ int sz = s.size(); if(sz > 3){ if(s[2] >= '1') cout << "YES" << endl; else cout << "NO" << endl; } else{ if(s[2] >= '2') cout << "YES" << endl; else cout << "NO" << endl; } }else cout << "NO" << endl; } }
To view or add a comment, sign in