Need help with Trie insertions, I am currently working on a DSA specialization on Coursera, Strings course

I am trying the insertion operation in a Trie and a read operation for the below implementation I am having trouble with insertion.

import java.util.*; class node{ public int val; public node ptrs[]; node(){     this.val =0;     ptrs = new node[26];     for (node ptr : ptrs) {         ptr = null;     }   }     } class Tree{ public node root = new node(); public int pass =0; void insert(String s) {     node trv = root;     for (int i = 0; i < s.length(); i++) {         if (trv.ptrs[s.charAt(i) - 'A'] == null) {             trv.ptrs[s.charAt(i) - 'A'] = new node();             trv.val = ++pass;           //  System.out.println(s.charAt(i)+" val : "+trv.val);         }          trv = trv.ptrs[s.charAt(i) - 'A'];     } } private void visit(node trv){     for(int i =0;i<26;i++){         if(trv.ptrs[i]!=null){             System.out.println((char)(i+'A')+" : "+trv.val);             visit(trv.ptrs[i]);         }     } } void call(){     this.visit(root);  }  } public class trie {   public static void main(String[] args) {     Scanner sc = new Scanner(System.in);     int n = sc.nextInt();     Tree t = new Tree();     while (n-- > 0) {         String s = sc.next();         t.insert(s);     }     t.call();     sc.close();  } } 

my output :

3 ATAGA ATC GAT A : 7 T : 2 A : 6 G : 4 A : 5 C : 6 G : 7 A : 8 T : 9 

expected output :

3 ATAGA ATC GAT A : 1 T : 2 A : 3 G : 4 A : 5 C : 6 G : 7 A : 8 T : 9 

HPC cluster slows to standstill, is it currently under attack?

I am part of a university with an HPC cluster, which has just slowed to an almost-standstill for no clear reason. The login nodes and the compute nodes both seem to be affected. I can connect, and do basic things (cd, ls) but anything more just seems to hang. My internet connection is fine. There is no scheduled maintenance.

Is this cluster under attack?

Is this a problem that needs to be solved urgently (as in “call people in out of hours”) to prevent some kind of damage?

Can you Ready a Help action against a creature not (currently) adjacent to you?

Per the combat rules,

Alternatively, you can aid a friendly creature in attacking a creature within 5 feet of you.

Is there anything in the rules that prevents me from readying an action to help one specific creature (Friend) attack another (Enemy), should at some point before my next turn Enemy find itself within 5ft of me?

If I’m currently on a website and disable my VPN, is my ISP or the web server immediately aware of the change or does a page refresh have to occur?

For example: I’m browsing my favorite website with my favorite VPN enabled. I disable my VPN while I’m still on a page of the website. I haven’t clicked any links yet, I haven’t went back to the previous page, I’m just on the page, touching nothing. At this point, are the web server and ISP now aware of this change? Or does a page refresh / new request have to occur?

If I had to guess, it would be no, because it would be theoretically the same thing as viewing the webpage and disconnecting your internet completely. Am I on the right track?

I want to delete connections in tnsnames.ora. I need to figure out which ones are currently in use, so that I don’t delete them mistakenly


I’m using Oracle 12c in Debian 8 (on a vm)

This question is for educational purposes only. I’m not using any production servers, so anything that you can tell me won’t have consecuences

To start with, I found this link to delete registers in tnsnames.ora. I didn’t test it yet because first, I needed to know if there were active connections in the database using the information of the tnsnames.ora.
I’m asking here because I found no way of doing this, but it may be possible to do it.

For you to know, I’m using this command for connecting to the database, so that I clearly specify a tnsname

rlwrap sqlplus sys as sysdba@tnstest 

The contents of my tnsnames.ora are the following

tnstest =   (DESCRIPTION =     (ADDRESS_LIST =       (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1539))     )     (CONNECT_DATA =       (SERVER = DEDICATED)       (SERVICE_NAME = orcl)     )   ) 

But, if I want to be 100% sure that this is working, I use this command

tnsping tnstest 

Which results are…

TNS Ping Utility for Linux: Version 12.2.0.1.0 - Production on 28-JAN-2020 23:51:38  Copyright (c) 1997, 2016, Oracle.  All rights reserved.  Used parameter files: /opt/oracle/product/12.1.0.2/dbhome_1/network/admin/sqlnet.ora   Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1539))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl))) OK (0 msec) 

After all of this I know that my configuration is working, I’m using a register in tnsnames.ora for the connection, but I don’t know a way of checking…
“Hey, now that I’m connected, I want to know which register I used from the tnsnames file for connecting, if I used that file of course”

Is there any possibility that I could get this information?

Well, my following attempts of trying to figure this out, were checking the v$ session view, if there was any field that I could use to get this information, but I couldn’t find one.

After all of this, ultimately, I came here for asking. I don’t know what else to try nor I have more ideas of what should I do next.

P.S: there’s a chance that this problem is impossible to solve, because this is task I’m doing due to I’m a student of sysadmin, and our teacher intentionally added unsolvable questions.
Even so, I still think there might be a solution for this particular case

Have PCs Historically Played Through More Campaigns Than is Currently Typical?

I’m relatively new to D&D, only having tabletop experience with 5e and a bit of 3.5, along with some scattered exposure to earlier editions through video games.

I’ve heard references to characters adventuring through multiple campaigns, sometimes a large number of them. But as I look through the published campaigns for 5e I see a lot of suggested level references which suggest that a character might properly fit up to two adventures. For example, the introduction to Descent into Avernus expects PCs to start at level 1 and be at least level 13 by the end.

Of course different editions have very different properties that touch on this– 3.5 had a lot of postgame content published specifically to take characters beyond the “maximum” level (whether they were good mechanics or not), while 5e doesn’t (as far as I’m aware). And published adventures are hardly the core of all D&D games played across all tables. But the basic 5e approach, and the adventures published for it, suggests to me that a PC might only see 2-3 non-oneshot adventures at most.

It’s not a problem (there are any number of ways to fiddle with adventure length and character progression) but I’m curious about whether or not the game has changed in this respect.

Has D&D always had this structure of relatively few adventures/campaigns per character (as either a game design element or by popular play style), or did a transition take place at some point? If there was a transition, when did it take place and what was the motivation?

(A valid answer can also be that I’m using terms like adventure and campaign imprecisely)

Is playing an Aarakocra player character currently legal in Adventurers League?

I’d like to know if playing an Aarakocra character is currently legal in the D&D 5e Adventurers League.

The Aarakocra race has been in D&D for a while, but is described in detail in 5e in the Elemental Evil Player’s Companion on page 3:

This chapter presents three new races to supplement those in the Player’s Handbook […] These new options are available when you make a character, provided that your DM allows them in your campaign.

Is there a way to know if transmission-daemon currently active?

I have a laptop that i use as a media station connected to my TV, occasionally i would fall a sleep and forget to shutdown the laptop and that is unwanted behavior. so i use crontabs to shutdown my laptop everyday at 7AM because i am sure that i am always either asleep or not at home then.

However sometimes i am actually downloading something using transmission-daemon and would prefer the laptop not to turn off at that time. Is there a way to check whether transmission daemon is downloading or not? like a file flag by transmission-daemon? i though about scanning the active ports used by transmission-daemon but i figured that there might be a more elegant solution.