java solution
\npublic int numOfPairs(String[] nums, String target) {\n        HashMap<String, Integer> map = new HashMap<>();\n        \n        for(String s: nums) {\n     
```\npublic int numOfPairs(String[] nums, String target) {\n        HashMap<String, Integer> map = new HashMap<>();\n        \n        for(String s: nums) {\n            map.put(s, map.getOrDefault(s,0) + 1);\n        }\n        int result = 0;\n        for(int i  = 1; i < target.length(); i++) {\n            String a1 = target.substring(0,i);\n            String b1 = target.substring(i);\n            if (map.containsKey(a1) && map.containsKey(b1)) {\n                int a = map.get(a1);\n                int b = map.get(b1);\n                \n                //System.out.println(a1 + " " + a + "  " + b1 + " " + b);\n                if (a1.equals(b1) )\n                    result += combi(a);\n                else\n                    result += a*b;\n                \n            }\n        }\n        \n        return result;\n    }\n    \n    private int combi(int c) {\n        if (c <  2)\n            return 0;\n        \n        return c*(c-1);\n    }\n```
[]