User Profile

Collapse

Profile Sidebar

Collapse
Rina0
Rina0
Last Activity: Nov 6 '23, 08:30 AM
Joined: Jul 18 '23
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Python code for finding the longest common subsequence

    I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in Java. Can anyone help me translate the Java code into Python?

    Here is the Java code from the blog post:

    Code:
    java
    public static int longestCommonSubsequence(String X, String Y) {
    int m = X.length();
    int n
    ...
    See more | Go to post

  • I agree, that sounds like a very entertaining and informative book! It's always good to have a laugh at the expense of bad practices, and it sounds like this book does a good job of that.

    I also like that the book is based on real-life cases. This makes it more relatable and believable, and it also helps to show the consequences of following these bad practices.

    Overall, it sounds like a great resource for C++ developers,...
    See more | Go to post

    Leave a comment:


  • Rina0
    started a topic Python code for finding GCD of two numbers

    Python code for finding GCD of two numbers

    Hi everyone,

    I am trying to find the greatest common divisor (GCD) of two numbers in Python from here. I found a few different algorithms online, but I am not sure which one is the most efficient.

    Here is the code I have so far:
    Code:
    def gcd(x, y):
        while y:
            x, y = y, x % y
        return x
    
    
    print(gcd(10, 15))
    This code uses Euclid's algorithm...
    See more | Go to post

  • Rina0
    replied to My two arrays look like this:
    You can use the following Java code to create a third array that is unique by eliminating duplicates from the second array:
    Code:
    import java.util.Arrays;
    import java.util.HashSet;
    
    public class RemoveDuplicates {
    
        public static void main(String[] args) {
            String[] array1 = {"ADAIR", "ADAM", "ADAMINA", "ADDISON", "ADDY", "ADELLE", "ADEN",
    ...
    See more | Go to post

    Leave a comment:


  • Rina0
    replied to Software testing
    Here is the difference between functional testing and non-functional testing:

    Functional testing is a kind of software testing that confirms the software satisfies its specifications. It focuses on the software's functionality, such as whether it can carry out the tasks that it is intended to carry out. Manual testers or automated test scripts are frequently used for functional testing.

    Non-functional testing is a kind...
    See more | Go to post

    Leave a comment:


  • Rina0
    replied to what is stream in java?
    in Java
    A stream in Java is a sequence of elements that can be processed in a declarative way. It is a new abstraction introduced in Java 8 that allows you to perform operations on data in a more efficient and concise way.

    Streams are not data structures, but they can be used to process data structures. They can be created from collections, arrays, or I/O channels.

    Streams are processed lazily. This means that elements are only...
    See more | Go to post

    Leave a comment:


  • Rina0
    replied to Code Editor for Python, Javascript and CSS
    Here are some suggestions for good code editors: Visual Studio Code, PyCharm, Sublime Text, Atom
    See more | Go to post

    Leave a comment:


  • Rina0
    started a topic Need help with Java Questions Asked in Interviews
    in Java

    Need help with Java Questions Asked in Interviews

    Hello everyone,

    I recently went through a Java Interview Questions resources and encountered a couple of queries for which I'm seeking answers and suggestions.

    Query 1:
    During the interview, I was presented with the following class:

    Code:
    java
    class CricketTeam{
        String name; //this is the complete name (inclusive of first and last name)
    }

    Additionally, I...
    See more | Go to post

  • Rina0
    started a topic How to Become a Cyber Security Engineer

    How to Become a Cyber Security Engineer

    Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and vulnerabilities . Cyber security engineers work to ensure the confidentiality , integrity, and availability of information systems and data by implementing security measures such as firewalls, encryption, and access controls.

    They also play a crucial...
    See more | Go to post

  • Rina0
    replied to SQL Working with two rows at the same time.
    To create a report that shows the SSN and the net amount (positive - negative) for each SSN, you can use SQL to perform the necessary calculations. Here's a sample SQL query that should achieve this:

    Code:
    sql
    SELECT SSN, SUM(amount) AS net_amount
    FROM (
        SELECT SSN, 
               CASE 
                   WHEN tran_code = 'SSN' THEN amount
                   ELSE -amount
               END AS amount
    ...
    See more | Go to post

    Leave a comment:


  • Rina0
    started a topic Need Help with SQL Query Interview Questions

    Need Help with SQL Query Interview Questions

    Hello,
    I am currently preparing for SQL interviews and came across a fantastic resource that provides a list of SQL query interview questions.

    While going through the questions, I stumbled upon a few that are quite challenging, and I'm struggling to come up with the most efficient SQL queries to solve them. I was hoping some of you with more experience in SQL could lend a helping hand or provide some guidance.

    ...
    See more | Go to post

  • How to _not_ strip HTML comments from a HTML template in gin gonic

    I'm using Gin Gonic with a HTML template file.

    My template file contains (multi line) HTML comments of the kind <!-- my comment goes here-->. I want that the HTML content is preserved in the output which is returned by

    Code:
    c.HTML(http.StatusOK, "static/templates/mytemplate.html", gin.H{
        "name": "World",
    })
    where c is a *gin.Context.

    Question:...
    See more | Go to post
No activity results to display
Show More
Working...